Skip to content

Instantly share code, notes, and snippets.

@mridulgain
Last active October 30, 2025 13:39
Show Gist options
  • Select an option

  • Save mridulgain/250ec4f640f064ee9779aebdb7b5690d to your computer and use it in GitHub Desktop.

Select an option

Save mridulgain/250ec4f640f064ee9779aebdb7b5690d to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: debug-daemon
namespace: default
spec:
selector:
matchLabels:
app: debug-pod
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: debug-pod
spec:
hostNetwork: true
hostPID: true
hostIPC: true
tolerations:
- operator: Exists
effect: NoSchedule
- operator: Exists
effect: NoExecute
containers:
- name: debug
image: quay.io/platform9/ubuntu:netshoot
command: ["/bin/bash"]
args: ["-c", "sleep infinity"]
securityContext:
privileged: true
allowPrivilegeEscalation: true
runAsUser: 0
capabilities:
add:
- SYS_ADMIN
- SYS_PTRACE
- SYS_TIME
- NET_ADMIN
- IPC_LOCK
env:
- name: DEBIAN_FRONTEND
value: noninteractive
volumeMounts:
- name: host-root
mountPath: /host
readOnly: false
- name: host-var-log
mountPath: /host/var/log
readOnly: true
- name: host-dev
mountPath: /dev
readOnly: false
- name: host-proc
mountPath: /host/proc
readOnly: true
- name: host-sys
mountPath: /host/sys
readOnly: true
- name: host-run
mountPath: /host/run
readOnly: false
- name: host-var-run
mountPath: /host/var/run
readOnly: false
volumes:
- name: host-root
hostPath:
path: /
type: Directory
- name: host-var-log
hostPath:
path: /var/log
type: Directory
- name: host-dev
hostPath:
path: /dev
type: Directory
- name: host-proc
hostPath:
path: /proc
type: Directory
- name: host-sys
hostPath:
path: /sys
type: Directory
- name: host-run
hostPath:
path: /run
type: Directory
- name: host-var-run
hostPath:
path: /var/run
type: Directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment