How to enable kube-system/metrics-server from status "False (MissingEndpoints)"?
Asked Answered
L

4

5

My metrics-server was sudden not working and got below information:

$ kubectl get apiservices |egrep metrics
v1beta1.metrics.k8s.io kube-system/metrics-server False (MissingEndpoints)

I tried to implement below but still not okay:

$ git clone https://github.com/kubernetes-incubator/metrics-server.git
$ cd metrics-server
$ kubectl apply -f deploy/1.8+/

Please advise, thanks.

Landmark answered 31/8, 2019 at 16:38 Comment(7)
try deleting metrics pods?Suited
Hi @4c74356b41, I tried to ran kubectl delete -f ./deploy/1.8+/ and re-ran kubectl apply -f deploy/1.8+/ but still failed. Any commands that I can use?Landmark
are you using aks or not? if you are using aks metrics server is built-inSuited
Yes, but it is suddenly gone but don't know how to make it work again. You may refer to This link for what I performed before. Thanks.Landmark
Hi @4c74356b41, do you have any ideas? thanks.Landmark
it cant be gone, it would get reapplied instantlySuited
Yes, after I upgraded kubernetes version, it is came back, thanks.Landmark
S
4

in this case the solution was to upgrade kubernetes version for nodes to reapply metrics server

Suited answered 3/9, 2019 at 9:1 Comment(0)
R
14

I solved this issue the following:

Download metrics-server:

wget https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml

Remove metrics server:

kubectl delete -f components.yaml  

Edit downloaded file and add - --kubelet-insecure-tls flag:

labels:
    k8s-app: metrics-server
spec:
  containers:
  - args:
    - --cert-dir=/tmp
    - --secure-port=443
    - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
    - --kubelet-use-node-status-port
    - --metric-resolution=15s
    - --kubelet-insecure-tls

Create service once again:

kubectl apply -f components.yaml
Raber answered 10/9, 2021 at 10:24 Comment(0)
S
4

in this case the solution was to upgrade kubernetes version for nodes to reapply metrics server

Suited answered 3/9, 2019 at 9:1 Comment(0)
G
1

Also, upgrading to the latest (0.4.1) version of metrics-server probably fixes similar issues (like False (MissingEndpoints)):

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.4.1/components.yaml;
Grapery answered 25/12, 2020 at 18:7 Comment(0)
B
0

This worked on my AKS cluster

Remove metrics server deployment:

kubectl delete deployment metrics-server -n kube-system

Deploy the latest Metrics Server:

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

Restart the cluster:

az aks stop --name myAKSCluster --resource-group myResourceGroup

az aks start --name myAKSCluster --resource-group myResourceGroup
Bricklayer answered 7/5 at 6:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.