Created
July 18, 2023 11:05
-
-
Save PhilipSchmid/ec4996c0c21f4bb952731339bf3546be to your computer and use it in GitHub Desktop.
kubectl run Pod with hostPath
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 -it --rm tshoot --overrides=' | |
{ | |
"spec": { | |
"containers": [ | |
{ | |
"name": "tshoot", | |
"image": "nicolaka/netshoot:latest", | |
"command": ["/bin/bash"], | |
"stdin": true, | |
"stdinOnce": true, | |
"tty": true, | |
"volumeMounts": [{ | |
"mountPath": "/host/etc", | |
"name": "hostdir" | |
}] | |
} | |
], | |
"volumes": [{ | |
"name":"hostdir", | |
"hostPath": { | |
"path": "/etc", | |
"type": "Directory" | |
} | |
}] | |
} | |
} | |
' --image=nicolaka/netshoot:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment