Skip to content

Instantly share code, notes, and snippets.

@carloscarnero
Created August 12, 2021 12:07
Show Gist options
  • Save carloscarnero/251073fd2303afce651878a0b0c9a880 to your computer and use it in GitHub Desktop.
Save carloscarnero/251073fd2303afce651878a0b0c9a880 to your computer and use it in GitHub Desktop.
Simple deployment with a privileged that mounts the host's / filesystem
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: inspector
spec:
selector:
matchLabels:
application.name: inspector
replicas: 1
template:
metadata:
labels:
application.name: inspector
spec:
containers:
- name: busybox
image: busybox:1.33.1
command:
- /bin/sh
- -c
args:
- tail -f /dev/null
securityContext:
privileged: true
volumeMounts:
- name: host
mountPath: /mnt/host
volumes:
- name: host
hostPath:
path: /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment