diff --git a/01_nginx/yaml/03_service.yaml b/01_nginx/yaml/03_service.yaml new file mode 100644 index 0000000..653b20f --- /dev/null +++ b/01_nginx/yaml/03_service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: nginx +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 80 + selector: + app: nginx + type: ClusterIP + +# vim: set ts=2 sw=2 et: diff --git a/01_nginx/yaml/04_configmap.yaml b/01_nginx/yaml/04_configmap.yaml new file mode 100644 index 0000000..9fceee1 --- /dev/null +++ b/01_nginx/yaml/04_configmap.yaml @@ -0,0 +1,11 @@ +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: nginx-webpage +data: + index.html: | + +

Hello World !

+ +# vim: set ts=2 sw=2 et: diff --git a/01_nginx/yaml/05_deployment.yaml b/01_nginx/yaml/05_deployment.yaml new file mode 100644 index 0000000..17a6b84 --- /dev/null +++ b/01_nginx/yaml/05_deployment.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:stable + ports: + - containerPort: 80 + volumeMounts: + - name: webpage + mountPath: /usr/share/nginx/html + volumes: + - name: webpage + configMap: + name: nginx-webpage + +# vim: set ts=2 sw=2 et: