abuhaneef
asked on
How do I su root in a kubernetes pod?
I have an AWX kubernetes pod. Once I connect to the pod, how do I elevate to root?
Why would you want to elevate to root... the whole purpose of docker/kubernetes is to shield the host from it's guests. Allowing root inside a container would defeat the whole purpose of containers...
ASKER
Hey Noci. AWX for ansible installs on a Kubernetes pod. I need to modify /etc/krb5.conf on the awx pod to have my ansible code talk to Windows servers via kerberos. Because I am not root, I can't modify config files.
ASKER
Yujin,
I am familar with that command. It drops me to "bash-4.4$" with no privileges'.
Thanks
I am familar with that command. It drops me to "bash-4.4$" with no privileges'.
Thanks
You could update the pod's Deployment so that /etc/krb5.conf is a mounted file, then you can define its contents from the host machine, or from a configmap.
Just remember that modifying a file in a running pod like this won't survive a pod restart.
Just remember that modifying a file in a running pod like this won't survive a pod restart.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
Don't think you can elevate to root.