Azure 无法从Kubernetes获取API版本:无法检索服务器API的完整列表
尝试部署应用程序时出错,如下所示:Azure 无法从Kubernetes获取API版本:无法检索服务器API的完整列表,azure,kubernetes,azure-devops,kubectl,azure-aks,Azure,Kubernetes,Azure Devops,Kubectl,Azure Aks,尝试部署应用程序时出错,如下所示: Error: UPGRADE FAILED: could not get apiVersions from Kubernetes: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request kubectl api资源的输出包括一些资源,最后还有相同的错误 环境
Error: UPGRADE FAILED: could not get apiVersions from Kubernetes: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request
kubectl api资源的输出包括一些资源,最后还有相同的错误
环境:Azure云,AKS服务当主节点无法访问度量服务器pod时,通常会发生此错误。可能的原因有
kubectl top nodes
和kubectl top pods-A
以查看metric server运行是否正常kubectl get apiservices
:如果metric server service因错误而关闭CrashLoopBackOff请尝试执行步骤2,否则只需尝试使用kubectl delete apiservice/“service\u name”重新启动metric server service。对我来说,它是v1beta1.metrics.k8s.iokubectl获取pods-n kube系统
,发现metrics服务器、kubernetes仪表板等pods因主coreDNS pod关闭而关闭对我来说是:
NAME READY STATUS RESTARTS AGE
pod/coredns-85577b65b-zj2x2 0/1 CrashLoopBackOff 7 13m
kubectl description pod/“pod_name”
检查coreDNS pod中的错误,如果是由于/etc/coreDNS/Corefile:10-解析期间出错:未知指令代理,那么我们需要在coreDNS配置所在的yaml文件中使用转发而不是代理。因为映像使用的CoreDNS版本1.5x不再支持代理关键字您能否发布kubectl get pod-A的输出,并更详细地描述您的环境-cloud/on prem cluster/minikube、OS等?@KFC_uu获得了解决方案Hey@Moulick,不,它不正常,并因CrashLoopBackOff错误而失败。