如何将其放入Traefik吊舱? [英] How to ssh into a Traefik pod?
问题描述
我正在使用GKE.我已经通过kubectl启动了以下traefik部署:
I am using GKE. I've launched the following traefik deployment through kubectl:
https://github.com/containous /traefik/blob/master/examples/k8s/traefik-deployment.yaml
pod在kube-system名称空间上运行. 我无法将其放入吊舱中.
The pod runs on the kube-system namespace. I'm not able to ssh into the pod.
kubectl get po -n kube-system
traefik-ingress-controller-5bf599f65d-fl9gx 1/1 Running 0 30m
kubectl get po -n kube-system
traefik-ingress-controller-5bf599f65d-fl9gx 1/1 Running 0 30m
kubectl exec -it traefik-ingress-controller-5bf599f65d-fl9gx -n kube-system -- '\bin\bash'
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"\\\\bin\\\\bash\": executable file not found in $PATH"
command terminated with exit code 126
kubectl exec -it traefik-ingress-controller-5bf599f65d-fl9gx -n kube-system -- '\bin\bash'
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"\\\\bin\\\\bash\": executable file not found in $PATH"
command terminated with exit code 126
我错过了什么吗? -sh"也是如此.
Am I missing something? The same thing for '-- sh' too.
推荐答案
因此,显然默认的traefik映像是amd64版本.我必须使用高山版本使用以下命令将其SSH进入它:
kubectl exec -it _podname_ -- sh
So, apparently the default traefik image is an amd64 version. I had to use the alpine version to ssh into it using:
kubectl exec -it _podname_ -- sh
这篇关于如何将其放入Traefik吊舱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!