Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: mysql-<your-name>
- labels:
- app: mysql-<your-name>
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: mysql-<your-name>
- template:
- metadata:
- labels:
- app: mysql-<your-name>
- spec:
- containers:
- - image: mysql:5.6
- name: mysql-<your-name>
- env:
- - name: MYSQL_ROOT_PASSWORD
- valueFrom:
- secretKeyRef:
- name: mysql-<your-name>
- key: password
- ports:
- - containerPort: 3306
- name: mysql-<your-name>
- volumeMounts:
- - name: mysql-persistent-storage-<your-name>
- mountPath: /var/lib/mysql
- volumes:
- - name: mysql-persistent-storage-<your-name>
- persistentVolumeClaim:
- claimName: mysql-volumeclaim-<your-name>
Add Comment
Please, Sign In to add comment