Skip to content

Instantly share code, notes, and snippets.

@zedtux
Created November 21, 2019 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zedtux/79dd0b38d00a2bb6b4a825c88f6edb66 to your computer and use it in GitHub Desktop.
Save zedtux/79dd0b38d00a2bb6b4a825c88f6edb66 to your computer and use it in GitHub Desktop.
Kubernetes Debug pod to access PV from PVC name
apiVersion: v1
kind: Pod
metadata:
name: mysql-debug
spec:
containers:
- name: mysql-debug
image: mysql:5.7
command:
- sleep
- "3600"
resources:
requests:
cpu: 250m
memory: 500Mi
limits:
cpu: 1000m
memory: 1Gi
imagePullPolicy: Always
volumeMounts:
- mountPath: /var/lib/mysql
name: mysql-data
imagePullSecrets:
- name: regcred
restartPolicy: Always
volumes:
- name: mysql-data
persistentVolumeClaim:
claimName: mysql-data-0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment