diff --git a/wordpress/wordpress-secrets.yml b/wordpress/wordpress-secrets.yml new file mode 100644 index 0000000..ebb492e --- /dev/null +++ b/wordpress/wordpress-secrets.yml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: wordpress-secrets +type: Opaque +data: + db-password: cGFzc3dvcmQ= diff --git a/wordpress/wordpress-service.yml b/wordpress/wordpress-service.yml new file mode 100644 index 0000000..23b773d --- /dev/null +++ b/wordpress/wordpress-service.yml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: wordpress-service +spec: + ports: + - port: 31001 + nodePort: 31001 + targetPort: http-port + protocol: TCP + selector: + app: wordpress + type: NodePort diff --git a/wordpress/wordpress-single-deployment-no-volumes.yml b/wordpress/wordpress-single-deployment-no-volumes.yml new file mode 100644 index 0000000..38058b4 --- /dev/null +++ b/wordpress/wordpress-single-deployment-no-volumes.yml @@ -0,0 +1,36 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: wordpress-deployment +spec: + replicas: 1 + template: + metadata: + labels: + app: wordpress + spec: + containers: + - name: wordpress + image: wordpress:4-php7.0 + ports: + - name: http-port + containerPort: 80 + env: + - name: WORDPRESS_DB_PASSWORD + valueFrom: + secretKeyRef: + name: wordpress-secrets + key: db-password + - name: WORDPRESS_DB_HOST + value: 127.0.0.1 + - name: mysql + image: mysql:5.7 + ports: + - name: mysql-port + containerPort: 3306 + env: + - name: MYSQL_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: wordpress-secrets + key: db-password