Skip to content

Instantly share code, notes, and snippets.

@manics
Created December 10, 2022 23:49
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 manics/5ebd130a0446f27f4719ad5f9fbc7bd8 to your computer and use it in GitHub Desktop.
Save manics/5ebd130a0446f27f4719ad5f9fbc7bd8 to your computer and use it in GitHub Desktop.
Privileged Kubernetes Netshoot pod for with host mounted read-only at /mnt/root
apiVersion: v1
kind: Pod
metadata:
labels:
app: netshoot
name: netshoot
spec:
containers:
- args:
- sleep
- 3650d
image: docker.io/nicolaka/netshoot:latest
imagePullPolicy: Always
name: netshoot
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- mountPath: /mnt/root
name: host-root
readOnly: true
nodeSelector:
kubernetes.io/arch: amd64
restartPolicy: Always
tolerations:
- effect: NoSchedule
key: hub.jupyter.org/dedicated
operator: Equal
value: user
volumes:
- hostPath:
path: /
type: Directory
name: host-root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment