Skip to content

Instantly share code, notes, and snippets.

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 javawolfpack/9b97e1e08e23a248e3d419a7e026e3e6 to your computer and use it in GitHub Desktop.
Save javawolfpack/9b97e1e08e23a248e3d419a7e026e3e6 to your computer and use it in GitHub Desktop.
Kubectl Override JSON
kubectl run -i --rm --tty mpi-test --overrides='
{
"apiVersion": "batch/v1",
"spec": {
"template": {
"spec": {
"volumes": [
{
"secret": {
"secretName": "ssh-key-secret"
},
"name": "ssh-keys"
}
],
"containers": [
{
"image": "javawolfpack/base-centos-mpi",
"volumeMounts": [
{
"readOnly": false,
"mountPath": "/home/mpi/.ssh/",
"name": "ssh-keys"
}
]
}
]
}
}
}
' --image=javawolfpack/base-centos-mpi --restart=Never -- bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment