Tag Archives: pod deploy error

[Solved] Error: Could not get apiVersions from Kubernetes

question:

Having trouble deploying pods

# 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

Solution:

Find the offending apiservice and delete it.

//View the problematic 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  

//Delete the problematic apiservice
# kubectl delete apiservice v1beta1.metrics.k8s.io
apiservice.apiregistration.k8s.io "v1beta1.metrics.k8s.io" deleted