Error: Could not get apiVersions from Kubernetes
问题
部署pod时遇到问题
# helm install chart.tgz
Error: 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
解决
找到出问题的apiservice并删除。
//查看出问题的apiservice
# kubectl get apiservice
NAME SERVICE AVAILABLE
v1. Local True
v1.admissionregistration.k8s.io Local True
v1.apiextensions.k8s.io Local True
v1.apps Local True
v1.authentication.k8s.io Local True
v1.authorization.k8s.io Local True
v1.autoscaling Local True
v1.batch Local True
v1.coordination.k8s.io Local True
v1.crd.projectcalico.org Local True
v1.networking.k8s.io Local True
v1.rbac.authorization.k8s.io Local True
v1.scheduling.k8s.io Local True
v1.storage.k8s.io Local True
v1beta1.admissionregistration.k8s.io Local True
v1beta1.apiextensions.k8s.io Local True
v1beta1.authentication.k8s.io Local True
v1beta1.authorization.k8s.io Local True
v1beta1.batch Local True
v1beta1.certificates.k8s.io Local True
v1beta1.coordination.k8s.io Local True
v1beta1.discovery.k8s.io Local True
v1beta1.events.k8s.io Local True
v1beta1.extensions Local True
v1beta1.metrics.k8s.io default/unm-k8s-metrics-server False (FailedDiscoveryCheck) <<< 删除
v1beta1.networking.k8s.io Local True
v1beta1.node.k8s.io Local True
v1beta1.policy Local True
v1beta1.rbac.authorization.k8s.io Local True
v1beta1.scheduling.k8s.io Local True
v1beta1.storage.k8s.io Local True
v2beta1.autoscaling Local True
v2beta2.autoscaling Local True
//删除出问题的apiservice
# kubectl delete apiservice v1beta1.metrics.k8s.io
apiservice.apiregistration.k8s.io "v1beta1.metrics.k8s.io" deleted