Created
March 24, 2020 11:35
-
-
Save devopsmariocom/d29d935e2220bcfbb1716ef86d436839 to your computer and use it in GitHub Desktop.
K8s debug pods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: dnsutils | |
namespace: default | |
spec: | |
containers: | |
- name: dnsutils | |
image: gcr.io/kubernetes-e2e-test-images/dnsutils:1.3 | |
command: | |
- sleep | |
- "3600" | |
imagePullPolicy: IfNotPresent | |
securityContext: | |
privileged: true | |
volumeMounts: | |
- name: resolvconf | |
mountPath: /resolv.conf | |
restartPolicy: Always | |
volumes: | |
- name: resolvconf | |
hostPath: | |
# directory location on host | |
path: /etc/resolv.conf | |
# this field is optional | |
type: File | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: hostmount | |
namespace: default | |
spec: | |
containers: | |
- name: busybox | |
image: busybox | |
resources: | |
limits: | |
cpu: 200m | |
memory: 100Mi | |
requests: | |
cpu: 100m | |
memory: 50Mi | |
stdin: true | |
securityContext: | |
privileged: true | |
volumeMounts: | |
- name: host-root-volume | |
mountPath: /host | |
readOnly: true | |
volumes: | |
- name: host-root-volume | |
hostPath: | |
path: / | |
hostNetwork: true | |
hostPID: true | |
restartPolicy: Always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment