Kubernetes
Easy
Security
Which Pod spec setting asks the kubelet to run a Pod in its own Linux user namespace?
Select your answer:
Show answer and explanation
Answer: spec.hostUsers: false
Explanation
Setting spec.hostUsers to false opts the Pod into a user namespace, so root inside the container maps to an unprivileged ID range on the host. runAsNonRoot only makes the kubelet refuse to start containers that would run as UID 0, and it does not create a user namespace.
More easy Kubernetes questions
- Which node user must have entries in /etc/subuid and /etc/subgid to give the kubelet a custom ID range for user namespace Pods?
- What stage did the UserNamespacesSupport feature gate reach in Kubernetes 1.36?
- Which kubectl command is used to view the logs of a pod?
- What is a Pod in Kubernetes?
- What is the purpose of a Kubernetes Service?
- Which command would you use to create a deployment from a YAML file?