[英]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.我们尝试使用以下命令将外壳附加到“Traefik”Pod 内的容器,但没有奏效。 Just FYI, we used helm chart to install Traefik on our k8s cluster.
仅供参考,我们使用 helm chart 在我们的 k8s 集群上安装 Traefik。
kubectl exec -it <traefik Pod name> -- /bin/sh
tried this too but no success - kubectl exec -it <traefik Pod name> -- /bin/bash
也尝试过,但没有成功 -
kubectl exec -it <traefik Pod name> -- /bin/bash
Any help in this context will be appreciated.在这方面的任何帮助将不胜感激。 Thanks.
谢谢。
Traefik 1.7 uses a FROM scratch
container image that has only the Traefik executable and some support files. Traefik 1.7 使用一个
FROM scratch
容器镜像,它只有 Traefik 可执行文件和一些支持文件。 There is no shell.没有外壳。 You would have to switch to the
-alpine
variant of the image.您必须切换到图像的
-alpine
变体。 For 2.x it looks like they use Alpine by default for some reason.对于 2.x,出于某种原因,他们似乎默认使用 Alpine。
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/参考: https : //bobcares.com/blog/change-time-in-docker-container/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.