You may just try to do “docker exec -u0 -it container_name bash” to get root permission in the running container. If you are on minikube you may need to do a “minikube ssh” first to gain access to the running containers. This will be different if you are using something else like k3s
Technically, you can.
However, it is important to note that any changes in the container are volatile and all changes will be lost on re-creation of the pod.
If you need this method for anything other than debugging or investigation purposes, I think you are probably on the wrong way for your purpose.
i am having same question, can anyone help ?
trying to install tcpdump
kubectl exec -i -t -n awx --container awx-web – /bin/bash
bash-5.1$ yum install tcpdump
Error: This command has to be run with superuser privileges (under the root user on most systems).
bash-5.1$
bash-5.1$
bash-5.1$ sudo yum install tcpdump
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility.
@khush which k8s are you using? (k3s, minikube, etc)
kuro’s suggestion above is the way to do it via k3s
the other alternative is to use docker to build a new image based off of quay.io/ansible/awx image and install tcpdump. Then you can use that image by setting “image” and “image_version” in your awx CRD