Skip to content

Instantly share code, notes, and snippets.

@zachomedia
Created August 23, 2020 18:08
Show Gist options
  • Save zachomedia/2a3a799a1468915de7414f2bcacda984 to your computer and use it in GitHub Desktop.
Save zachomedia/2a3a799a1468915de7414f2bcacda984 to your computer and use it in GitHub Desktop.
Kubernetes Node Shell
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: sh
namespace: kube-system
spec:
selector:
matchLabels:
app: sh
template:
metadata:
labels:
app: sh
spec:
hostPID: true
hostIPC: true
hostNetwork: true
containers:
- name: sh
image: alpine:latest
command: ["cat"]
tty: true
resources:
limits:
memory: "128Mi"
cpu: "100m"
securityContext:
privileged: true
volumeMounts:
- name: root
mountPath: /mnt
volumes:
- name: root
hostPath:
path: /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment