Skip to content

Instantly share code, notes, and snippets.

@hjacobs
Created January 13, 2017 08:15
Show Gist options
  • Select an option

  • Save hjacobs/448f1aa39bf69bc810ce26a6125997b5 to your computer and use it in GitHub Desktop.

Select an option

Save hjacobs/448f1aa39bf69bc810ce26a6125997b5 to your computer and use it in GitHub Desktop.

Revisions

  1. hjacobs created this gist Jan 13, 2017.
    23 changes: 23 additions & 0 deletions pod-host-access.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    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: /