Skip to content

Instantly share code, notes, and snippets.

@Raboo
Created July 10, 2026 07:04
Show Gist options
  • Select an option

  • Save Raboo/cc761b73540ba4ab89f446e3f5cdee2c to your computer and use it in GitHub Desktop.

Select an option

Save Raboo/cc761b73540ba4ab89f446e3f5cdee2c to your computer and use it in GitHub Desktop.
netshoot psa restricted
kubectl run netshoot --rm -it --image=nicolaka/netshoot --annotations='inject-certs=enabled' --overrides='
{
"spec": {
"securityContext": {
"runAsNonRoot": true,
"runAsUser": 1000,
"seccompProfile": {
"type": "RuntimeDefault"
}
},
"containers": [
{
"name": "netshoot",
"image": "nicolaka/netshoot",
"command": ["bash"],
"stdin": true,
"tty": true,
"securityContext": {
"allowPrivilegeEscalation": false,
"capabilities": {
"drop": ["ALL"]
}
}
}
]
}
}' -n namespace -- bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment