error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is cu

本文涉及的产品
容器服务 Serverless 版 ACK Serverless,952元额度 多规格
容器服务 Serverless 版 ACK Serverless,317元额度 多规格
简介: error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is cu
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/

相关实践学习
通过Ingress进行灰度发布
本场景您将运行一个简单的应用,部署一个新的应用用于新的发布,并通过Ingress能力实现灰度发布。
容器应用与集群管理
欢迎来到《容器应用与集群管理》课程,本课程是“云原生容器Clouder认证“系列中的第二阶段。课程将向您介绍与容器集群相关的概念和技术,这些概念和技术可以帮助您了解阿里云容器服务ACK/ACK Serverless的使用。同时,本课程也会向您介绍可以采取的工具、方法和可操作步骤,以帮助您了解如何基于容器服务ACK Serverless构建和管理企业级应用。 学习完本课程后,您将能够: 掌握容器集群、容器编排的基本概念 掌握Kubernetes的基础概念及核心思想 掌握阿里云容器服务ACK/ACK Serverless概念及使用方法 基于容器服务ACK Serverless搭建和管理企业级网站应用
相关文章
|
4月前
|
容器
Unable to create tempDir. java.io.tmpdir is set to /tmp
Unable to create tempDir. java.io.tmpdir is set to /tmp
193 1
|
17天前
|
Kubernetes Serverless API
Kubernetes 的架构问题之利用不可变性来最小化对API Server的访问如何解决
Kubernetes 的架构问题之利用不可变性来最小化对API Server的访问如何解决
64 7
|
18天前
|
Java Android开发
解决Android编译报错:Unable to make field private final java.lang.String java.io.File.path accessible
解决Android编译报错:Unable to make field private final java.lang.String java.io.File.path accessible
44 1
|
12天前
|
Kubernetes 监控 API
在k8S中,各模块如何与API Server进行通信的?
在k8S中,各模块如何与API Server进行通信的?
|
20天前
Unable to create tempDir. java.io.tmpdir is set to /tmp
Unable to create tempDir. java.io.tmpdir is set to /tmp
13 0
|
3月前
|
开发工具 Android开发 Windows
Android Studio安装Unable to access Android SDK add-on list处理方法
Android Studio安装Unable to access Android SDK add-on list处理方法
93 0
|
3月前
|
Java 应用服务中间件
已解决:An error occurred at line: 1 in the generated java file The type java.io.ObjectInputStream canno
已解决:An error occurred at line: 1 in the generated java file The type java.io.ObjectInputStream canno
66 0
|
4月前
|
NoSQL Java Redis
【问题篇】解决Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException
【问题篇】解决Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException
1049 0
|
4月前
|
存储 运维 Java
nacos常见问题之nacos提示ack server push request如何解决
Nacos是阿里云开源的服务发现和配置管理平台,用于构建动态微服务应用架构;本汇总针对Nacos在实际应用中用户常遇到的问题进行了归纳和解答,旨在帮助开发者和运维人员高效解决使用Nacos时的各类疑难杂症。
|
4月前
Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider解决
Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider解决
325 0

热门文章

最新文章

推荐镜像

更多
下一篇
云函数