Search code examples
kubernetestraefiktraefik-ingress

Get a Shell to running container inside "Traefik" Pod on k8s


We tried attaching a shell to container inside "Traefik" Pod using following command but it didn't work. Just FYI, we used helm chart to install Traefik on our k8s cluster.

kubectl exec -it <traefik Pod name> -- /bin/sh

tried this too but no success - kubectl exec -it <traefik Pod name> -- /bin/bash

Any help in this context will be appreciated. Thanks.


Solution

  • Traefik 1.7 uses a FROM scratch container image that has only the Traefik executable and some support files. There is no shell. You would have to switch to the -alpine variant of the image. For 2.x it looks like they use Alpine by default for some reason.