microk8s
microk8s copied to clipboard
metrics-server image addons can not download.
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
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.
Might be network reason? Try another registry mirror.
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.
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.
Addons metrics-server cannot be enabled issue ,if your image is not able to download,please refer the below step.
-
cd /var/snap/microk8s/common/addons/core/addons/metrics-server
-
vim metrics-server.yaml
-
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