Skip to content

KKCluster registryMirrors not effective #2429

@PungYoung

Description

@PungYoung

What is version of KubeKey has the issue?

v3.1.6

What is your os environment?

ubuntu 20.04

KubeKey config file

No response

A clear and concise description of what happend.

apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: KKCluster
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"infrastructure.cluster.x-k8s.io/v1beta1","kind":"KKCluster","metadata":{"annotations":{},"name":"capi-quickstart","namespace":"default"},"spec":{"component":{"zone":"cn"},"controlPlaneLoadBalancer":{"host":"192.168.31.136"},"nodes":{"auth":{"password":"123456","user":"yang"},"instances":[{"address":"192.168.31.136"}]},"registry":{"registryMirrors":["k8s.m.daocloud.io"]}}}
  creationTimestamp: "2024-10-02T01:10:23Z"
  finalizers:
  - kkcluster.infrastructure.cluster.x-k8s.io
  generation: 2
  labels:
    cluster.x-k8s.io/cluster-name: capi-quickstart
  name: capi-quickstart
  namespace: default
  ownerReferences:
  - apiVersion: cluster.x-k8s.io/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: Cluster
    name: capi-quickstart
    uid: a9505e97-52a3-428b-a142-ffeed807875c
  resourceVersion: "564081"
  uid: 84d71118-2cac-4d6d-907b-b1715106b1f5
spec:
  component:
    zone: cn
  controlPlaneEndpoint:
    host: 192.168.31.136
    port: 6443
  controlPlaneLoadBalancer:
    host: 192.168.31.136
  distribution: kubernetes
  nodes:
    auth:
      password: "123456"
      port: 22
      timeout: 30000000000
      user: yang
    instances:
    - address: 192.168.31.136
      arch: amd64
      auth: {}
      internalAddress: 192.168.31.136
      name: kk-instance-jb74d
      roles:
      - control-plane
      - worker
  registry:
    auth:
      certsPath: ""
      insecureSkipVerify: false
      password: ""
      plainHTTP: false
      username: ""
    namespaceOverride: ""
    privateRegistry: ""
    registryMirrors:
    - k8s.m.daocloud.io

host log:

 cat /var/log/syslog

Relevant log output

Oct 13 01:01:35 kk-instance-8wm68 kubelet[26774]: E1013 01:01:35.272791   26774 kuberuntime_sandbox.go:72] "Failed to create sandbox for pod" err="rpc error: code = DeadlineExceeded desc = failed to get sandbox image \"registry.k8s.io/pause:3.8\": failed to pull image \"registry.k8s.io/pause:3.8\": failed to pull and unpack image \"registry.k8s.io/pause:3.8\": failed to resolve reference \"registry.k8s.io/pause:3.8\": failed to do request: Head \"https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/pause/manifests/3.8\": dial tcp 64.233.187.82:443: i/o timeout" pod="kube-system/kube-controller-manager-kk-instance-jb74d"
Oct 13 01:01:35 kk-instance-8wm68 kubelet[26774]: E1013 01:01:35.272807   26774 kuberuntime_manager.go:1168] "CreatePodSandbox for pod failed" err="rpc error: code = DeadlineExceeded desc = failed to get sandbox image \"registry.k8s.io/pause:3.8\": failed to pull image \"registry.k8s.io/pause:3.8\": failed to pull and unpack image \"registry.k8s.io/pause:3.8\": failed to resolve reference \"registry.k8s.io/pause:3.8\": failed to do request: Head \"https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/pause/manifests/3.8\": dial tcp 64.233.187.82:443: i/o timeout" pod="kube-system/kube-controller-manager-kk-instance-jb74d"
Oct 13 01:01:35 kk-instance-8wm68 kubelet[26774]: E1013 01:01:35.272855   26774 pod_workers.go:1301] "Error syncing pod, skipping" err="failed to \"CreatePodSandbox\" for \"kube-controller-manager-kk-instance-jb74d_kube-system(4c97f0cc993d7c98be1df8edcf429793)\" with CreatePodSandboxError: \"Failed to create sandbox for pod \\\"kube-controller-manager-kk-instance-jb74d_kube-system(4c97f0cc993d7c98be1df8edcf429793)\\\": rpc error: code = DeadlineExceeded desc = failed to get sandbox image \\\"registry.k8s.io/pause:3.8\\\": failed to pull image \\\"registry.k8s.io/pause:3.8\\\": failed to pull and unpack image \\\"registry.k8s.io/pause:3.8\\\": failed to resolve reference \\\"registry.k8s.io/pause:3.8\\\": failed to do request: Head \\\"https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/pause/manifests/3.8\\\": dial tcp 64.233.187.82:443: i/o timeout\"" pod="kube-system/kube-controller-manager-kk-instance-jb74d" podUID="4c97f0cc993d7c98be1df8edcf429793"

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions