-
-
Save waynedovey/c485f2a3fa80b9d10df392530cb65491 to your computer and use it in GitHub Desktop.
Wordpress Kubernetes Cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: wordpress-mysql | |
| labels: | |
| app: wordpress | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: wordpress | |
| tier: mysql | |
| strategy: | |
| type: Recreate | |
| template: | |
| metadata: | |
| labels: | |
| app: wordpress | |
| tier: mysql | |
| spec: | |
| containers: | |
| - image: mysql:5.6 | |
| name: mysql | |
| env: | |
| - name: MYSQL_ROOT_PASSWORD | |
| valueFrom: | |
| secretKeyRef: | |
| name: mysql-pass | |
| key: password | |
| ports: | |
| - containerPort: 3306 | |
| name: mysql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| data: | |
| password: cGFzc3dvcmQ= | |
| kind: Secret | |
| metadata: | |
| name: mysql-pass | |
| namespace: wordpress | |
| type: Opaque |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: wordpress-mysql | |
| labels: | |
| app: wordpress | |
| spec: | |
| ports: | |
| - port: 3306 | |
| selector: | |
| app: wordpress | |
| tier: mysql | |
| clusterIP: None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: wordpress | |
| labels: | |
| app: wordpress | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: wordpress | |
| tier: frontend | |
| strategy: | |
| type: Recreate | |
| template: | |
| metadata: | |
| labels: | |
| app: wordpress | |
| tier: frontend | |
| spec: | |
| containers: | |
| - image: wordpress:4.8-apache | |
| name: wordpress | |
| env: | |
| - name: WORDPRESS_DB_HOST | |
| value: wordpress-mysql | |
| - name: WORDPRESS_DB_PASSWORD | |
| valueFrom: | |
| secretKeyRef: | |
| name: mysql-pass | |
| key: password | |
| ports: | |
| - containerPort: 80 | |
| name: wordpress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: wordpress | |
| labels: | |
| app: wordpress | |
| spec: | |
| ports: | |
| - port: 80 | |
| nodePort: 31476 | |
| selector: | |
| app: wordpress | |
| tier: frontend | |
| type: LoadBalancer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment