Asking for help? Comment out what you need so we can get more information to help you!
Cluster information:
Kubernetes version:1.21
Cloud being used: (put bare-metal if not on a public cloud)
Installation method:binary
Host OS: centos7
CNI and version:calico
CRI and version: docker
You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.
However, when executing kubectl top pods an error occurs:
W1212 13:09:35.004801 8720 top_pod.go:140] Using json format to get metrics. Next release will switch to protocol-buffers, switch early by passing --use-protocol-buffers flag
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io)
check apiserver,Failed to check availability upon discovery
kubectl get apiservices
NAME SERVICE AVAILABLE AGE
v1beta1.metrics.k8s.io kube-system/metrics-server False (FailedDiscoveryCheck) 12d
check describe pod,metrics-server,apiservice v1.certificates.k8s.io,no errors
ping 10.96.165.35 can be connect,but telnet 10.96.165.35 443,can not connect;
Only in work pod of which metrics pod in it executing telnet 10.96.165.35 443 able connect,how to fix this error,so in master node can use kubectl top pods command