There have been many related posts, but I am trying to install some packages (dnsutils, get), etc within the running Postgresql container hosted in the Kubernetes cluster. my Kubernetes cluster is RKE2 binaries.
I cannot use docker as my RKE2 cluster does not support docker so I tried to use runc but was still not able to log in as root into the container.
I want to use kubectl exec into the container and install some packages but it requires root privileges and I need to install sudo within the container which I am not able to install.
kubectl exec -it <pod name> -- bin/bash
$ apt-get update
var/lib/apt/lists/partial is missing
$ apt-get upgrade
could not open the lock file /var/lib/dpkg/locl-frontend - open (13: permission denied)
If I try to run with sudo inside the container i.e :/$ sudo apt-get update && sudo apt-get upgrade sudo not found
I also tried to enter in root user mode within the container, it is asking the password which I do not know which password need to enter
:/$ su - Password:
I have tried everything but nothing is working.
Any suggestion would be appreciated