Last active
May 22, 2019 08:14
-
-
Save aisrael/de29f32d6aa7fa5886f312aba0ff96b0 to your computer and use it in GitHub Desktop.
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: mariadb-deployment | |
spec: | |
selector: | |
matchLabels: | |
app: mariadb | |
template: | |
metadata: | |
labels: | |
app: mariadb | |
spec: | |
containers: | |
- name: mariadb | |
image: mariadb:10.4.4 | |
env: | |
- name: MYSQL_ROOT_PASSWORD | |
valueFrom: | |
secretKeyRef: | |
name: mariadb-secrets | |
key: mysql-root-password | |
volumeMounts: | |
- name: mariadb-pv | |
mountPath: /var/lib/mysql | |
ports: | |
- containerPort: 3306 | |
volumes: | |
- name: mariadb-pv | |
persistentVolumeClaim: | |
claimName: mariadb-pvc |
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: PersistentVolumeClaim | |
metadata: | |
name: mariadb-pvc | |
labels: | |
app: wordpress | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 1Gi |
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: Secret | |
metadata: | |
name: mariadb-secrets | |
data: | |
mysql-root-password: Mzk1MjgkdmRnN0pi |
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: mariadb | |
spec: | |
type: ClusterIP | |
ports: | |
- port: 3306 # the port that this service will serve on | |
targetPort: 3306 # should match containerPort | |
selector: | |
app: mariadb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment