Skip to content

Instantly share code, notes, and snippets.

@hjacobs
Created January 13, 2017 08:15
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 hjacobs/448f1aa39bf69bc810ce26a6125997b5 to your computer and use it in GitHub Desktop.
Save hjacobs/448f1aa39bf69bc810ce26a6125997b5 to your computer and use it in GitHub Desktop.
Kubernetes Host Access
apiVersion: v1
kind: Pod
metadata:
name: host-access
spec:
# use a node selector matching the desired target node
nodeSelector:
kubernetes.io/hostname: ip-172-31-1-2.eu-central-1.compute.internal
containers:
- name: shell
image: ubuntu:latest
command:
- sleep
- "999999"
securityContext:
privileged: true
volumeMounts:
- mountPath: /host-root
name: host-root
volumes:
- name: host-root
hostPath:
path: /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment