[英]How to check ingress controller version on minikube kubernetes cluster
Documentation says that I need to enter pod, but I can't.文档说我需要进入 pod,但我不能。
sudo kubectl get pods -n kube-system
gives me following output: sudo kubectl get pods -n kube-system
给了我以下 output:
coredns-66bff467f8-bhwrx 1/1 Running 4 10h
coredns-66bff467f8-ph2pb 1/1 Running 4 10h
etcd-ubuntu-xenial 1/1 Running 3 10h
ingress-nginx-admission-create-mww2h 0/1 Completed 0 4h48m
ingress-nginx-admission-patch-9dklm 0/1 Completed 0 4h48m
ingress-nginx-controller-7bb4c67d67-8nqcw 1/1 Running 1 4h48m
kube-apiserver-ubuntu-xenial 1/1 Running 3 10h
kube-controller-manager-ubuntu-xenial 1/1 Running 3 10h
kube-proxy-hn9qw 1/1 Running 3 10h
kube-scheduler-ubuntu-xenial 1/1 Running 3 10h
storage-provisioner 1/1 Running 4 10h
When I trying to enter sudo kubectl exec ingress-nginx-controller-7bb4c67d67-8nqcw -- /bin/bash/
I receive following error: Error from server (NotFound): pods "ingress-nginx-controller-7bb4c67d67-8nqcw" not found
当我尝试输入
sudo kubectl exec ingress-nginx-controller-7bb4c67d67-8nqcw -- /bin/bash/
,我收到以下错误: Error from server (NotFound): pods "ingress-nginx-controller-7bb4c67d67-8nqcw" not found
Reason why I'm running everything with sudo is because I'm using vm-dirver=none
我使用 sudo 运行所有内容的原因是因为我使用的是
vm-dirver=none
Reason why I need to know ingress controller version is because I want to use a wildcard in host name to forward multiple subdomains to same service/port.我需要知道入口 controller 版本的原因是因为我想在主机名中使用通配符将多个子域转发到同一个服务/端口。 And I know that this feature is available only from ingress controller version 1.18.
而且我知道此功能仅适用于 ingress controller 1.18 版。
You get that error because you are not passing the namespace parameter ( -n kube-system
).您收到该错误是因为您没有传递命名空间参数 (
-n kube-system
)。
And to get the version, you would do this:要获取版本,您可以这样做:
kubectl get po ingress-nginx-controller-7bb4c67d67-8nqcw -n kube-system -oyaml | grep -i image:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.