Skip to content

Instantly share code, notes, and snippets.

@akshaymankar
Last active July 23, 2019 12:38
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 akshaymankar/bc58e654d87a0d214eb8f78f0a720b4c to your computer and use it in GitHub Desktop.
Save akshaymankar/bc58e654d87a0d214eb8f78f0a720b4c to your computer and use it in GitHub Desktop.
Privileged Pod
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: privileged-ds
spec:
selector:
matchLabels:
app: privileged
template:
metadata:
labels:
app: privileged
spec:
securityContext:
runAsUser: 0
volumes:
- name: host-root
hostPath:
path: /
containers:
- name: privileged
image: bash
command: [ "sh", "-c", "sleep 24h" ]
volumeMounts:
- mountPath: /host-root
name: host-root
apiVersion: v1
kind: Pod
metadata:
name: privileged
spec:
securityContext:
runAsUser: 0
volumes:
- name: host-root
hostPath:
path: /
containers:
- name: privileged
image: bash
command: [ "sh", "-c", "sleep 1h" ]
volumeMounts:
- mountPath: /host-root
name: host-root
nodeSelector:
"kubernetes.io/hostname": <name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment