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

2/11/2020

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.

-- Sunny Goel
kubernetes
traefik
traefik-ingress

2 Answers

2/12/2020

You can change the time zone by mounting volume

volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"

Ref: https://bobcares.com/blog/change-time-in-docker-container/

-- F. Kam
Source: StackOverflow

2/11/2020

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.

-- coderanger
Source: StackOverflow