Skip to content

Instantly share code, notes, and snippets.

@brtkwr
Forked from strigazi/debugging-daemonset.yaml
Last active September 15, 2020 10:26
Show Gist options
  • Select an option

  • Save brtkwr/5fecfe07e978cedec30e37cf69102c1b to your computer and use it in GitHub Desktop.

Select an option

Save brtkwr/5fecfe07e978cedec30e37cf69102c1b to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Namespace
metadata:
name: debug
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: debug-app
namespace: debug
labels:
k8s-app: debug-app
spec:
selector:
matchLabels:
name: debug-app
template:
metadata:
labels:
name: debug-app
spec:
hostNetwork: true
tolerations:
- effect: NoSchedule
operator: Exists
containers:
- name: centos
image: centos:8
command:
- /bin/sh
args:
- -c
- "sleep 100d"
securityContext:
privileged: true
volumeMounts:
- name: hostfs
mountPath: /hostfs
- name: httpd
image: httpd
ports:
- containerPort: 80
volumes:
- name: hostfs
hostPath:
path: /
type: Directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment