"kubectl describe ingress ..." could not find the requested resource

9/16/2019

I am trying to execute describe on ingress but does not work. Get command works fine but not describe. Is anything that I am doing wrong? I am running this against AKS.

usr@test:/mnt/c/Repos/user/charts/canary$ kubectl get ingress
NAME            HOSTS                              ADDRESS   PORTS   AGE
ingress-route   xyz.westus.cloudapp.azure.com                80      6h

usr@test:/mnt/c/Repos/user/charts/canary$ kubectl describe ingress ingress-route
Error from server (NotFound): the server could not find the requested resource

Version seems fine:

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", ..}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.10"...}
-- user3053247
azure-aks
kubernetes
kubernetes-ingress

1 Answer

10/15/2019

This is probably caused by the incompatibility between your Kubernetes cluster version and your kubectl version.

Run kubectl version to print the client and server versions for the current context, example:

$ kubectl version

Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.1", GitCommit:"d647ddbd755faf07169599a625faf302ffc34458", GitTreeState:"clean", BuildDate:"2019-10-02T17:01:15Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.10-gke.0", GitCommit:"569511c9540f78a94cc6a41d895c382d0946c11a", GitTreeState:"clean", BuildDate:"2019-08-21T23:28:44Z", GoVersion:"go1.11.13b4", Compiler:"gc", Platform:"linux/amd64"}

You might want to upgrade your cluster version or downgrade your kubectl version. See more details in https://github.com/kubernetes/kubectl/issues/675

-- Dagang
Source: StackOverflow