Overview
While attempting to run your workload in Kubernetes, the client workload POD is returning the following error message, "sudo: you do not exist in the passwd database".
Applies To
- Kubernetes
- Edge Components
Cause
- POD level SecurityContext was set with value runAsUser: 1000
- Container - SecurityContext
Solution
There might be a conflict worth investigating between your POD security context and container security context. Here, POD level SecurityContext was set with runAsUser: 1000 instead of at the container level SecurityContext.
Modify your POD and Container SecurityContext as referenced below.
E.g.
apiVersion: v1
kind: Pod
metadata:
name: security-context-example
spec:
securityContext:
runAsUser: 1000 PLEASE REMOVE
runAsGroup: 3000 PLEASE REMOVE
...
containers:
- name: sec-ctx-demo
image: busybox:1.28
securityContext:
allowPrivilegeEscalation: false
runAsUser: 1000 PLEASE ADD
...