Created
June 13, 2023 14:18
-
-
Save toms-place/44f7dd8a12693304d3a8f6a3f31ceb74 to your computer and use it in GitHub Desktop.
kubectl run with volume mount
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
kubectl run -it --rm ubuntu --overrides=' | |
{ | |
"apiVersion": "v1", | |
"spec": { | |
"containers": [ | |
{ | |
"name": "ubuntu", | |
"image": "ubuntu:latest", | |
"args": [ | |
"bash" | |
], | |
"stdin": true, | |
"stdinOnce": true, | |
"tty": true, | |
"volumeMounts": [{ | |
"mountPath": "/dev/shm", | |
"name": "store" | |
}] | |
} | |
], | |
"volumes": [{ | |
"name":"store", | |
"emptyDir": { | |
"medium": "Memory", | |
"sizeLimit": "1Gi" | |
} | |
}] | |
} | |
} | |
' --image=ubuntu:latest --restart=Never -- bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment