Gradiant / 5g-charts

Helm charts for 5G Technologies
Apache License 2.0
110 stars 43 forks source link

info query - root password for containers (nrf, nssf, pcf, udm, ...) #109

Closed jmarkotic closed 1 year ago

jmarkotic commented 1 year ago

Hi, not an issue, just info query. i wanted to install some packages on some pods/containers (mainly tcpdump for traffic inspection). I can instal it on on upf, since i can sudo there. But for rest of pods, it does not allowed me. And i don't know root password on those. Is there a way to install some packages on those pods (root password ?) Kudos for great work done ! thanks

cgiraldo commented 1 year ago

I do not recommend you to modify a running container. Containers are not equivalent to VMs. I would try to use a sidecar container with an image with the tools you need. Sidecar containers share network interfaces with the main containers.

Another option, if your deployment do not have security concerns, you can modify the container security context to make it run as root: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

You will find a value in the helm chart to modify the security context:

https://github.com/Gradiant/openverso-charts/blob/4ad6e7b6a24dad4dd213b0070fb5b78b69ca5ceb/charts/open5gs-amf/values.yaml#L252

However we have not test it.