microk8s icon indicating copy to clipboard operation
microk8s copied to clipboard

metrics-server image addons can not download.

Open rocket-tsang opened this issue 1 year ago • 4 comments

Summary

installation version: MicroK8s v1.28.3 revision 6089

What Should Happen Instead?

I install addons metrics-server ,but it seems to not download the image, does has anther image to download.

kim@kims:~$ microk8s kubectl get pods -o wide -A NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES kube-system kubernetes-dashboard-54b48fbf9-ccw5m 1/1 Running 1 (34m ago) 10h 10.1.98.199 kims kube-system coredns-864597b5fd-jwl4j 1/1 Running 1 (34m ago) 11h 10.1.98.200 kims kube-system dashboard-metrics-scraper-5657497c4c-zjljr 1/1 Running 1 (34m ago) 10h 10.1.98.198 kims kube-system calico-kube-controllers-77bd7c5b-242g2 1/1 Running 1 (34m ago) 11h 10.1.98.201 kims kube-system calico-node-hmgfc 1/1 Running 1 (34m ago) 11h 192.168.217.129 kims kube-system metrics-server-848968bdcd-f52qr 0/1 ImagePullBackOff 0 10h 10.1.98.202 kims

I use the below command to check the describe: microk8s kubectl describe pods -A

Events: Type Reason Age From Message


Normal BackOff 4m53s (x294 over 79m) kubelet Back-off pulling image "registry.k8s.io/metrics-server/metrics-server:v0.6.3"

who can resolve the issue? thank you for you help.

rocket-tsang avatar Jan 09 '24 01:01 rocket-tsang

Might be network reason? Try another registry mirror.

FlyingOnion avatar Jan 09 '24 13:01 FlyingOnion

I has fixed the issue,I changed the original repository to docker hub repository ,and set the metrics-server version from v0.63 to v0.64. and it works. I will show my steps in next comment.

rocket-tsang avatar Jan 13 '24 07:01 rocket-tsang

installation issue:

kube-system calico-node-htl54 0/1 Init:0/2 0 15h

Warning FailedCreatePodSandBox 3s (x716 over 15h) kubelet (combined from similar events): Failed to create pod sandbox: rpc error: code = DeadlineExceeded desc = failed to get sandbox image "registry.k8s.io/pause:3.7": failed to pull image "registry.k8s.io/pause:3.7": failed to pull and unpack image "registry.k8s.io/pause:3.7": failed to resolve reference "registry.k8s.io/pause:3.7": failed to do request: Head "https://asia-east1-docker.pkg.dev/v2/k8s-artifacts-prod/images/pause/manifests/3.7": dial tcp 108.177.97.82:443: i/o timeout

microk8s runs failed, if microk8s calico network image cannot be downloaded, use below command to check issue. sudo microk8s kubectl get po -A ,this command check your pod is available sudo microk8s kubectl describe pod/calico-node-xxxx -n kube-system,in this command,you must use your pod name instead of "xxxx" if you occur above issues,please view https://microk8s.io/docs/dockerhub-limits and https://github.com/canonical/microk8s/issues/3627

I use host "https://hub.docker.com/docker" instead.

rocket-tsang avatar Jan 14 '24 00:01 rocket-tsang

Addons metrics-server cannot be enabled issue ,if your image is not able to download,please refer the below step.

  1. cd /var/snap/microk8s/common/addons/core/addons/metrics-server

  2. vim metrics-server.yaml

  3. change image repository to "image: bitnami/metrics-server:0.6.4"

spec: containers: - args: - --cert-dir=/tmp - --secure-port=4443 - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname - --kubelet-use-node-status-port - --metric-resolution=15s - --kubelet-insecure-tls # ignore kubelet cert image: bitnami/metrics-server:0.6.4 imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 3

rocket-tsang avatar Jan 14 '24 02:01 rocket-tsang