Last active
July 23, 2019 12:38
-
-
Save akshaymankar/bc58e654d87a0d214eb8f78f0a720b4c to your computer and use it in GitHub Desktop.
Privileged Pod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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