From 4606ae6563f26d37eb885046d623a1a87f9d1672 Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Wed, 8 Jan 2020 11:00:26 +0100 Subject: [PATCH] first yaml for lab2 --- 02_wordpress/yaml/01_namespace.yaml | 7 +++++++ 02_wordpress/yaml/02_deployment.yaml | 22 ++++++++++++++++++++++ 02_wordpress/yaml/03_service.yaml | 15 +++++++++++++++ 02_wordpress/yaml/04_deployment.yaml | 25 +++++++++++++++++++++++++ 02_wordpress/yaml/05_service.yaml | 15 +++++++++++++++ 5 files changed, 84 insertions(+) create mode 100644 02_wordpress/yaml/01_namespace.yaml create mode 100644 02_wordpress/yaml/02_deployment.yaml create mode 100644 02_wordpress/yaml/03_service.yaml create mode 100644 02_wordpress/yaml/04_deployment.yaml create mode 100644 02_wordpress/yaml/05_service.yaml diff --git a/02_wordpress/yaml/01_namespace.yaml b/02_wordpress/yaml/01_namespace.yaml new file mode 100644 index 0000000..5b8fbb4 --- /dev/null +++ b/02_wordpress/yaml/01_namespace.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: lab2 + +# vim: set ts=2 sw=2 et: diff --git a/02_wordpress/yaml/02_deployment.yaml b/02_wordpress/yaml/02_deployment.yaml new file mode 100644 index 0000000..82e2883 --- /dev/null +++ b/02_wordpress/yaml/02_deployment.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wordpress +spec: + replicas: 1 + selector: + matchLabels: + app: wordpress + template: + metadata: + labels: + app: wordpress + spec: + containers: + - name: wordpress + image: wordpress:5 + ports: + - containerPort: 80 + +# vim: set ts=2 sw=2 et: diff --git a/02_wordpress/yaml/03_service.yaml b/02_wordpress/yaml/03_service.yaml new file mode 100644 index 0000000..d9703a9 --- /dev/null +++ b/02_wordpress/yaml/03_service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: wordpress +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 80 + selector: + app: wordpress + type: ClusterIP + +# vim: set ts=2 sw=2 et: diff --git a/02_wordpress/yaml/04_deployment.yaml b/02_wordpress/yaml/04_deployment.yaml new file mode 100644 index 0000000..bada669 --- /dev/null +++ b/02_wordpress/yaml/04_deployment.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mysql +spec: + replicas: 1 + selector: + matchLabels: + app: mysql + template: + metadata: + labels: + app: mysql + spec: + containers: + - name: mysql + image: mariadb:10 + ports: + - containerPort: 3306 + env: + - name: MYSQL_ROOT_PASSWORD + value: securepassword + +# vim: set ts=2 sw=2 et: diff --git a/02_wordpress/yaml/05_service.yaml b/02_wordpress/yaml/05_service.yaml new file mode 100644 index 0000000..23605de --- /dev/null +++ b/02_wordpress/yaml/05_service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: mysql +spec: + ports: + - port: 3306 + protocol: TCP + targetPort: 3306 + selector: + app: mysql + type: ClusterIP + +# vim: set ts=2 sw=2 et: