Skip to content

Instantly share code, notes, and snippets.

@viveksinghggits
Created September 6, 2019 16:22
Show Gist options
  • Save viveksinghggits/e70de48158b80e7171a009e1bd5849af to your computer and use it in GitHub Desktop.
Save viveksinghggits/e70de48158b80e7171a009e1bd5849af to your computer and use it in GitHub Desktop.
kind: Deployment
apiVersion: apps/v1
metadata:
name: mysql
spec:
replicas: 1
selector:
matchLabels:
app: mysql
strategy:
type: Recreate
template:
metadata:
labels:
app: mysql
spec:
containers:
- image: mysql:5.6
name: mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: vivek$ingh
ports:
- containerPort: 3306
name: mysql
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-pv-claim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment