error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is cu
metrics.k8s.io/v1beta1: the server is currently unable to handle the request
error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request
1.安装应用的时候
[root@node1 linux-amd64]# helm install ui stable/weave-scope
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
[root@node1 linux-amd64]# kubectl api-resource
Error: unknown command "api-resource" for "kubectl"
Did you mean this?
api-resources
Run 'kubectl --help' for usage.
解决:
kubectl api-resources
[root@node1 linux-amd64]# kubectl api-resources
NAME SHORTNAMES APIGROUP NAMESPACED KIND
bindings true Binding
componentstatuses cs false ComponentStatus
configmaps cm true ConfigMap
endpoints ep true Endpoints
events ev true Event
limitranges limits true LimitRange
namespaces ns false Namespace
nodes no false Node
persistentvolumeclaims pvc true PersistentVolumeClaim
persistentvolumes pv false PersistentVolume
pods po true Pod
podtemplates true PodTemplate
replicationcontrollers rc true ReplicationController
resourcequotas quota true ResourceQuota
secrets true Secret
serviceaccounts sa true ServiceAccount
services svc true Service
mutatingwebhookconfigurations admissionregistration.k8s.io false MutatingWebhookConfiguration
validatingwebhookconfigurations admissionregistration.k8s.io false ValidatingWebhookConfiguration
customresourcedefinitions crd,crds apiextensions.k8s.io false CustomResourceDefinition
apiservices apiregistration.k8s.io false APIService
controllerrevisions apps true ControllerRevision
daemonsets ds apps true DaemonSet
deployments deploy apps true Deployment
replicasets rs apps true ReplicaSet
statefulsets sts apps true StatefulSet
tokenreviews authentication.k8s.io false TokenReview
localsubjectaccessreviews authorization.k8s.io true LocalSubjectAccessReview
selfsubjectaccessreviews authorization.k8s.io false SelfSubjectAccessReview
selfsubjectrulesreviews authorization.k8s.io false SelfSubjectRulesReview
subjectaccessreviews authorization.k8s.io false SubjectAccessReview
horizontalpodautoscalers hpa autoscaling true HorizontalPodAutoscaler
cronjobs cj batch true CronJob
jobs batch true Job
certificatesigningrequests csr certificates.k8s.io false CertificateSigningRequest
leases coordination.k8s.io true Lease
endpointslices discovery.k8s.io true EndpointSlice
events ev events.k8s.io true Event
ingresses ing extensions true Ingress
ingressclasses networking.k8s.io false IngressClass
ingresses ing networking.k8s.io true Ingress
networkpolicies netpol networking.k8s.io true NetworkPolicy
runtimeclasses node.k8s.io false RuntimeClass
poddisruptionbudgets pdb policy true PodDisruptionBudget
podsecuritypolicies psp policy false PodSecurityPolicy
clusterrolebindings rbac.authorization.k8s.io false ClusterRoleBinding
clusterroles rbac.authorization.k8s.io false ClusterRole
rolebindings rbac.authorization.k8s.io true RoleBinding
roles rbac.authorization.k8s.io true Role
priorityclasses pc scheduling.k8s.io false PriorityClass
csidrivers storage.k8s.io false CSIDriver
csinodes storage.k8s.io false CSINode
storageclasses sc storage.k8s.io false StorageClass
volumeattachments storage.k8s.io false VolumeAttachment
2.找到1中的 apiservice
kubectl get apiservice
[root@node1 linux-amd64]# kubectl get apiservice
NAME SERVICE AVAILABLE AGE
v1. Local True 164d
v1.admissionregistration.k8s.io Local True 164d
v1.apiextensions.k8s.io Local True 164d
v1.apps Local True 164d
v1.authentication.k8s.io Local True 164d
v1.authorization.k8s.io Local True 164d
v1.autoscaling Local True 164d
v1.batch Local True 164d
v1.coordination.k8s.io Local True 164d
v1.networking.k8s.io Local True 164d
v1.rbac.authorization.k8s.io Local True 164d
v1.scheduling.k8s.io Local True 164d
v1.storage.k8s.io Local True 164d
v1beta1.admissionregistration.k8s.io Local True 164d
v1beta1.apiextensions.k8s.io Local True 164d
v1beta1.authentication.k8s.io Local True 164d
v1beta1.authorization.k8s.io Local True 164d
v1beta1.batch Local True 164d
v1beta1.certificates.k8s.io Local True 164d
v1beta1.coordination.k8s.io Local True 164d
v1beta1.discovery.k8s.io Local True 164d
v1beta1.events.k8s.io Local True 164d
v1beta1.extensions Local True 164d
v1beta1.metrics.k8s.io kube-system/metrics-server False (FailedDiscoveryCheck) 13d
v1beta1.networking.k8s.io Local True 164d
v1beta1.node.k8s.io Local True 164d
v1beta1.policy Local True 164d
v1beta1.rbac.authorization.k8s.io Local True 164d
v1beta1.scheduling.k8s.io Local True 164d
v1beta1.storage.k8s.io Local True 164d
v2beta1.autoscaling Local True 164d
v2beta2.autoscaling Local True 164d
可以看到有个事False的
3.直接删除
kubectl delete apiservice v1beta1.metrics.k8s.io
4.再次查看
[root@node1 linux-amd64]# kubectl get apiservice
NAME SERVICE AVAILABLE AGE
v1. Local True 164d
v1.admissionregistration.k8s.io Local True 164d
v1.apiextensions.k8s.io Local True 164d
v1.apps Local True 164d
v1.authentication.k8s.io Local True 164d
v1.authorization.k8s.io Local True 164d
v1.autoscaling Local True 164d
v1.batch Local True 164d
v1.coordination.k8s.io Local True 164d
v1.networking.k8s.io Local True 164d
v1.rbac.authorization.k8s.io Local True 164d
v1.scheduling.k8s.io Local True 164d
v1.storage.k8s.io Local True 164d
v1beta1.admissionregistration.k8s.io Local True 164d
v1beta1.apiextensions.k8s.io Local True 164d
v1beta1.authentication.k8s.io Local True 164d
v1beta1.authorization.k8s.io Local True 164d
v1beta1.batch Local True 164d
v1beta1.certificates.k8s.io Local True 164d
v1beta1.coordination.k8s.io Local True 164d
v1beta1.discovery.k8s.io Local True 164d
v1beta1.events.k8s.io Local True 164d
v1beta1.extensions Local True 164d
v1beta1.networking.k8s.io Local True 164d
v1beta1.node.k8s.io Local True 164d
v1beta1.policy Local True 164d
v1beta1.rbac.authorization.k8s.io Local True 164d
v1beta1.scheduling.k8s.io Local True 164d
v1beta1.storage.k8s.io Local True 164d
v2beta1.autoscaling Local True 164d
v2beta2.autoscaling Local True 164d
5.重新安装
[root@node1 linux-amd64]# helm install ui stable/weave-scope
NAME: ui
LAST DEPLOYED: Wed Mar 1 23:14:36 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
You should now be able to access the Scope frontend in your web browser, by
using kubectl port-forward:
kubectl -n default port-forward $(kubectl -n default get endpoints \
ui-weave-scope -o jsonpath='{.subsets[0].addresses[0].targetRef.name}') 8080:4040
then browsing to http://localhost:8080/.
For more details on using Weave Scope, see the Weave Scope documentation:
https://www.weave.works/docs/scope/latest/introducing/
更多推荐
所有评论(0)