Last active
May 22, 2019 08:14
-
-
Save aisrael/2e498bd1a6a6a3c3276547d719d9a6d8 to your computer and use it in GitHub Desktop.
wordpress Kubernetes
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-deployment | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: wordpress | |
template: | |
metadata: | |
labels: | |
app: wordpress | |
spec: | |
containers: | |
- name: wordpress | |
image: wordpress:5.2.0-php7.1 | |
env: | |
- name: WORDPRESS_DB_HOST | |
value: mariadb | |
- name: WORDPRESS_DB_PASSWORD | |
valueFrom: | |
secretKeyRef: | |
name: mariadb-secrets | |
key: mysql-root-password | |
ports: | |
- containerPort: 80 |
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 | |
spec: | |
type: NodePort | |
ports: | |
- port: 80 # the port that this service will serve on | |
targetPort: 80 # should match containerPort | |
nodePort: 30080 | |
selector: | |
app: wordpress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment