Back to questionsWhy does the kubelet refuse to start the container
JuniorTheoryCommon
Why does the kubelet refuse to start the container web in this Pod spec?
securityContext:
runAsNonRoot: true
containers:
- name: web
image: nginx:1.27.3The nginx:1.27.3 image runs as root and the spec sets no runAsUser. runAsNonRoot makes the kubelet refuse to start a container with UID 0, so the Pod shows CreateContainerConfigError.
- Expecting
runAsNonRootto switch the container to a non-root user by itself - Looking for the error in the app's logs, while the container never started and
kubectl describe podholds the reason
- Which field added to the spec lets this Pod start, and what else must the image allow?
- Why can the kubelet not verify an image whose
USERis a name rather than a number?