hostPath
A Kubernetes volume that mounts a file or directory from the node itself into a pod.
A hostPath mount can expose node files, sockets and credentials to the pod.
In more detail
Baseline forbids it because it lets a pod read or change the node, for example a host path mount of /var/log. Log agents that really need it belong in their own privileged namespace.
Related terms
- emptyDir — A Kubernetes volume that starts empty when a pod starts and is deleted when the pod ends.
- Pod Security Standards — Three built-in Kubernetes security profiles, called privileged, baseline and restricted, that define how locked down a pod must be.
Taught in
- etcd: Snapshot, Restore, And The Cache That Lies — Certified Kubernetes Administrator (CKA) Exam Prep
- Volumes By Hand: Access Modes, Binding And Reclaim — Certified Kubernetes Administrator (CKA) Exam Prep
- Choose The Right Workload Resource — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Persistent And Ephemeral Volumes — Certified Kubernetes Application Developer (CKAD) Exam Prep
- kube-bench: Ten Failures On A Fresh Cluster — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Anonymous Access: The Fix That Kills The API Server — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Pod Security Admission: Created, Never Started — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Encryption At Rest: What etcd Really Holds — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Audit Policy: Choosing What The Cluster Remembers — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Immutable Containers: Read-Only At Runtime — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Final Review: The Cluster You Would Defend — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Kubernetes Pod Security Standards: Baseline & Restricted — Cloud Security & DevSecOps Engineering
- A Pod That Mounts The Node: Runtime, Pods And Storage — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Component Sprint: The Reference Build — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Created, But Never Running: Pod Security Admission — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep