“ kubectl描述入口...”找不到请求的资源

时间:2019-09-16 07:19:18

标签: kubernetes kubernetes-ingress azure-aks

我试图在入口上执行描述,但不起作用。获取命令可以正常工作,但不能描述。我做错了什么吗?我正在针对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

版本似乎不错:

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", ..}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.10"...}

1 个答案:

答案 0 :(得分:0)

这可能是由于您的Kubernetes集群版本与kubectl版本之间不兼容引起的。

运行kubectl version以打印当前上下文的客户端和服务器版本,例如:

$ 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"}

您可能要升级群集版本或降级kubectl版本。在https://github.com/kubernetes/kubectl/issues/675

中查看更多详细信息