Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"kk artifact export" failed with unsupported docker #2432

Closed
Thatwho opened this issue Oct 17, 2024 · 2 comments
Closed

"kk artifact export" failed with unsupported docker #2432

Thatwho opened this issue Oct 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Thatwho
Copy link

Thatwho commented Oct 17, 2024

What is version of KubeKey has the issue?

v3.1.6

What is your os environment?

Ubunu2204 server

KubeKey config file

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
  name: sample
spec:
  hosts:
  - {name: node1, address: 10.0.2.15, internalAddress: 10.0.2.15, user: user, password: "123456"}
  roleGroups:
    etcd:
    - node1
    control-plane:
    - node1
    worker:
    - node1
  controlPlaneEndpoint:
    ## Internal loadbalancer for apiservers
    # internalLoadbalancer: haproxy

    domain: lb.kubesphere.local
    address: ""
    port: 6443
  kubernetes:
    version: 1.28.13
    clusterName: cluster.local
    autoRenewCerts: true
    containerManager: containerd
  etcd:
    type: kubekey
  network:
    plugin: calico
    kubePodsCIDR: 10.233.64.0/18
    kubeServiceCIDR: 10.233.0.0/18
    ## multus support. https://github.com/k8snetworkplumbingwg/multus-cni
    multusCNI:
      enabled: false
  registry:
    privateRegistry: ""
    namespaceOverride: ""
    registryMirrors: []
    insecureRegistries: []
  addons: []

A clear and concise description of what happend.

when user sudo kk artifact export -m /mnt/share/kubekey-airgapped/manifest-sample.yaml,it failed with “error: No SHA256 found for docker. 20.10.8 is not supported.”
The ddetail output log:

downloading amd64 docker 20.10.8 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58.1M  100 58.1M    0     0  2791k      0  0:00:21  0:00:21 --:--:-- 5451k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58.1M  100 58.1M    0     0  2705k      0  0:00:21  0:00:21 --:--:-- 5615k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58.1M  100 58.1M    0     0  2926k      0  0:00:20  0:00:20 --:--:-- 5595k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58.1M  100 58.1M    0     0  2803k      0  0:00:21  0:00:21 --:--:-- 5171k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58.1M  100 58.1M    0     0  2636k      0  0:00:22  0:00:22 --:--:-- 5049k
03:33:01 UTC message: [LocalHost]
Failed to download docker binary: curl -L -o /home/user/kubekey/artifact/docker/20.10.8/amd64/docker-20.10.8.tgz https://download.docker.com/linux/static/stable/x86_64/docker-20.10.8.tgz error: No SHA256 found for docker. 20.10.8 is not supported.
03:33:01 UTC failed: [LocalHost]
error: Pipeline[ArtifactExportPipeline] execute failed: Module[ArtifactBinariesModule] exec failed:
failed: [LocalHost] [DownloadBinaries] exec failed after 1 retries: Failed to download docker binary: curl -L -o /home/user/kubekey/artifact/docker/20.10.8/amd64/docker-20.10.8.tgz https://download.docker.com/linux/static/stable/x86_64/docker-20.10.8.tgz error: No SHA256 found for docker. 20.10.8 is not supported.

Relevant log output

downloading amd64 docker 20.10.8 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58.1M  100 58.1M    0     0  2791k      0  0:00:21  0:00:21 --:--:-- 5451k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58.1M  100 58.1M    0     0  2705k      0  0:00:21  0:00:21 --:--:-- 5615k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58.1M  100 58.1M    0     0  2926k      0  0:00:20  0:00:20 --:--:-- 5595k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58.1M  100 58.1M    0     0  2803k      0  0:00:21  0:00:21 --:--:-- 5171k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58.1M  100 58.1M    0     0  2636k      0  0:00:22  0:00:22 --:--:-- 5049k
03:33:01 UTC message: [LocalHost]
Failed to download docker binary: curl -L -o /home/user/kubekey/artifact/docker/20.10.8/amd64/docker-20.10.8.tgz https://download.docker.com/linux/static/stable/x86_64/docker-20.10.8.tgz error: No SHA256 found for docker. 20.10.8 is not supported.
03:33:01 UTC failed: [LocalHost]
error: Pipeline[ArtifactExportPipeline] execute failed: Module[ArtifactBinariesModule] exec failed:
failed: [LocalHost] [DownloadBinaries] exec failed after 1 retries: Failed to download docker binary: curl -L -o /home/user/kubekey/artifact/docker/20.10.8/amd64/docker-20.10.8.tgz https://download.docker.com/linux/static/stable/x86_64/docker-20.10.8.tgz error: No SHA256 found for docker. 20.10.8 is not supported.

Additional information

the manifest file is:

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Manifest
metadata:
  name: sample
spec:
  arches:
  - amd64
  operatingSystems:
  - arch: amd64
    type: linux
    id: ubuntu
    version: "22.04"
    osImage: Ubuntu 22.04.3 LTS
    repository:
      iso:
        localPath:
        url:
  kubernetesDistributions:
  - type: kubernetes
    version: v1.28.13
  components:
    helm:
      version: v3.14.3
    cni:
      version: v1.2.0
    etcd:
      version: v3.5.13
    containerRuntimes:
    - type: containerd
      version: 1.7.13
    - type: docker
      version: 20.10.8
    calicoctl:
      version: v3.27.4
    crictl:
      version: v1.29.0
    harbor:
      version: v2.11.0
    docker-compose:
      version: v2.2.2

  images:
  - docker.io/calico/cni:v3.27.4
  - docker.io/calico/kube-controllers:v3.27.4
  - docker.io/calico/node:v3.27.4
  - docker.io/coredns/coredns:1.9.3
  - docker.io/kubesphere/k8s-dns-node-cache:1.22.20
  - docker.io/kubesphere/kube-apiserver:v1.28.13
  - docker.io/kubesphere/kube-controller-manager:v1.28.13
  - docker.io/kubesphere/kube-proxy:v1.28.13
  - docker.io/kubesphere/kube-scheduler:v1.28.13
  - docker.io/kubesphere/pause:3.9
  registry:
    auths: {}

The config of docker in .spec.components.containerRuntimes was added manully, cause when using the kk create manifest command to generate the manifest file, the docker configuration is not included. However, when using the original manifest file to export an artifact for offline deployment of the cluster, kk attempts to download Docker, causing the installation to fail.

@Thatwho Thatwho added the bug Something isn't working label Oct 17, 2024
@Thatwho
Copy link
Author

Thatwho commented Oct 17, 2024

It seems that the version of kk I am using supports Docker version 24.0.9. When I ran the kk init registry command, the logs indicated that kk was attempting to download this version of Docker. So, I replaced the Docker version in the configuration, and now I am able to export the complete artifact file.
However, I didn't see this part mentioned in the documentation, maybe I missed something?

@Thatwho
Copy link
Author

Thatwho commented Oct 18, 2024

Oh, seems that should use kk create manifest --with-kubernetes v1.28.13 --arch amd64 --with-registry.

@Thatwho Thatwho closed this as completed Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant