Created
July 2, 2019 20:54
-
-
Save a-shevtsov/6e01a7c87eb9354726de9ef8f2f1096b to your computer and use it in GitHub Desktop.
Start pod with mounted PVC
This file contains 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
kubectl run -i --rm --tty busybox --overrides=' | |
{ | |
"kind": "Pod", | |
"apiVersion": "v1", | |
"spec": { | |
"containers": [ | |
{ | |
"name": "busybox", | |
"image": "busybox", | |
"args": [ | |
"/bin/sh" | |
], | |
"stdin": true, | |
"stdinOnce": true, | |
"tty": true, | |
"volumeMounts": [{ | |
"mountPath": "/<volume-name>", | |
"name": "<volume-name>" | |
}] | |
} | |
], | |
"volumes": [{ | |
"name": "<volume-name>", | |
"persistentVolumeClaim": { | |
"claimName": "<pvc-name>" | |
} | |
}] | |
} | |
} | |
' --image=busybox --restart=Never -- sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment