In Pod
specification, there is an option to specify the user ID that needs to be run as by all containers
podSecurityContext:
runAsUser: <a numeric Id>
Is there a way we can change the user name as well, the way we have for windows pods and container, like below
securityContext:
windowsOptions:
runAsUserName: "ContainerUser"
Unfortunately, there is no such way.
WindowsSecurityContextOptions
contain Windows-specific options and credentials. PodSecurityContext allows you to use:Trying to use String instead of Integer for
runAsUser
will result in error: