From 75d37cf0aa7cf39562850651a5b29e98f73306d0 Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Wed, 8 Jan 2020 10:14:17 +0100 Subject: [PATCH] add missing yaml files for lab1 --- 01_nginx/yaml/03_service.yaml | 15 +++++++++++++++ 01_nginx/yaml/04_configmap.yaml | 11 +++++++++++ 01_nginx/yaml/05_deployment.yaml | 29 +++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 01_nginx/yaml/03_service.yaml create mode 100644 01_nginx/yaml/04_configmap.yaml create mode 100644 01_nginx/yaml/05_deployment.yaml 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: