How to check ingress controller version on minikube kubernetes cluster

6/23/2020

Documentation says that I need to enter pod, but I can't.

sudo kubectl get pods -n kube-system gives me following 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

Reason why I'm running everything with sudo is because I'm using 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. And I know that this feature is available only from ingress controller version 1.18.

-- Volod
kubernetes
minikube
nginx
nginx-ingress

1 Answer

6/23/2020

You get that error because you are not passing the namespace parameter (-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:
-- suren
Source: StackOverflow