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

Container image pull arguments "--platform" not exits. #2370

Open
tinpont opened this issue Aug 22, 2024 · 0 comments
Open

Container image pull arguments "--platform" not exits. #2370

tinpont opened this issue Aug 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tinpont
Copy link

tinpont commented Aug 22, 2024

What is version of KubeKey has the issue?

3.1.5

What is your os environment?

Ubuntu 22.04

KubeKey config file

kubernetes:
    version: v1.28.12
    clusterName: cluster.local
    autoRenewCerts: true
    containerManager: containerd

A clear and concise description of what happend.

When calling create cluster --debug, we can see lots of crictl pull usage log:

18:32:34 CST command: [local-k8s-pre-master-001]
sudo -E /bin/bash -c "env PATH=$PATH crictl pull kubesphere/k8s-dns-node-cache:1.22.20 --platform amd64"
18:32:34 CST stdout: [local-k8s-pre-master-001]
NAME:
   crictl pull - Pull an image from a registry

USAGE:
   crictl pull command [command options] NAME[:TAG|@DIGEST]

COMMANDS:
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --annotation value, -a value [ --annotation value, -a value ]  Annotation to be set on the pulled image
   --auth AUTH_STRING                                             Use AUTH_STRING for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]' [$CRICTL_AUTH]
   --creds USERNAME[:PASSWORD]                                    Use USERNAME[:PASSWORD] for accessing the registry [$CRICTL_CREDS]
   --pod-config pod-config.[json|yaml]                            Use pod-config.[json|yaml] to override the pull c
   --username USERNAME, -u USERNAME                               Use USERNAME for accessing the registry. The password will be requested on the command line      
   --help, -h                                                     show help

So all crictl image does not download, caused by crictl doesn't has --platform support.

--platform is a docker special argument, please double check.

Reference source code:Link

Relevant log output

18:32:34 CST message: [local-k8s-pre-master-001]
downloading image: kubesphere/kube-proxy:v1.28.12
18:32:34 CST command: [local-k8s-pre-master-001]
sudo -E /bin/bash -c "env PATH=$PATH crictl pull kubesphere/kube-proxy:v1.28.12 --platform amd64"
18:32:34 CST stdout: [local-k8s-pre-master-001]
NAME:
   crictl pull - Pull an image from a registry

USAGE:
   crictl pull command [command options] NAME[:TAG|@DIGEST]

COMMANDS:
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --annotation value, -a value [ --annotation value, -a value ]  Annotation to be set on the pulled image
   --auth AUTH_STRING                                             Use AUTH_STRING for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]' [$CRICTL_AUTH]
   --creds USERNAME[:PASSWORD]                                    Use USERNAME[:PASSWORD] for accessing the registry [$CRICTL_CREDS]
   --pod-config pod-config.[json|yaml]                            Use pod-config.[json|yaml] to override the pull c
   --username USERNAME, -u USERNAME                               Use USERNAME for accessing the registry. The password will be requested on the command line      
   --help, -h                                                     show help
18:32:34 CST message: [local-k8s-pre-master-001]
downloading image: coredns/coredns:1.9.3
18:32:34 CST command: [local-k8s-pre-master-001]
sudo -E /bin/bash -c "env PATH=$PATH crictl pull coredns/coredns:1.9.3 --platform amd64"
18:32:34 CST stdout: [local-k8s-pre-master-001]
NAME:
   crictl pull - Pull an image from a registry

USAGE:
   crictl pull command [command options] NAME[:TAG|@DIGEST]

COMMANDS:
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --annotation value, -a value [ --annotation value, -a value ]  Annotation to be set on the pulled image
   --auth AUTH_STRING                                             Use AUTH_STRING for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]' [$CRICTL_AUTH]
   --creds USERNAME[:PASSWORD]                                    Use USERNAME[:PASSWORD] for accessing the registry [$CRICTL_CREDS]
   --pod-config pod-config.[json|yaml]                            Use pod-config.[json|yaml] to override the pull c
   --username USERNAME, -u USERNAME                               Use USERNAME for accessing the registry. The password will be requested on the command line      
   --help, -h                                                     show help
18:32:34 CST message: [local-k8s-pre-master-001]
downloading image: kubesphere/k8s-dns-node-cache:1.22.20
18:32:34 CST command: [local-k8s-pre-master-001]
sudo -E /bin/bash -c "env PATH=$PATH crictl pull kubesphere/k8s-dns-node-cache:1.22.20 --platform amd64"
18:32:34 CST stdout: [local-k8s-pre-master-001]
NAME:
   crictl pull - Pull an image from a registry

USAGE:
   crictl pull command [command options] NAME[:TAG|@DIGEST]

COMMANDS:
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --annotation value, -a value [ --annotation value, -a value ]  Annotation to be set on the pulled image
   --auth AUTH_STRING                                             Use AUTH_STRING for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]' [$CRICTL_AUTH]
   --creds USERNAME[:PASSWORD]                                    Use USERNAME[:PASSWORD] for accessing the registry [$CRICTL_CREDS]
   --pod-config pod-config.[json|yaml]                            Use pod-config.[json|yaml] to override the pull c
   --username USERNAME, -u USERNAME                               Use USERNAME for accessing the registry. The password will be requested on the command line      
   --help, -h                                                     show help
18:32:34 CST message: [local-k8s-pre-master-001]
downloading image: calico/kube-controllers:v3.27.3
18:32:34 CST command: [local-k8s-pre-master-001]
sudo -E /bin/bash -c "env PATH=$PATH crictl pull calico/kube-controllers:v3.27.3 --platform amd64"
18:32:34 CST stdout: [local-k8s-pre-master-001]
NAME:
   crictl pull - Pull an image from a registry

USAGE:
   crictl pull command [command options] NAME[:TAG|@DIGEST]

COMMANDS:
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --annotation value, -a value [ --annotation value, -a value ]  Annotation to be set on the pulled image
   --auth AUTH_STRING                                             Use AUTH_STRING for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]' [$CRICTL_AUTH]
   --creds USERNAME[:PASSWORD]                                    Use USERNAME[:PASSWORD] for accessing the registry [$CRICTL_CREDS]
   --pod-config pod-config.[json|yaml]                            Use pod-config.[json|yaml] to override the pull c
   --username USERNAME, -u USERNAME                               Use USERNAME for accessing the registry. The password will be requested on the command line      
   --help, -h                                                     show help
18:32:34 CST message: [local-k8s-pre-master-001]
downloading image: calico/cni:v3.27.3
18:32:34 CST command: [local-k8s-pre-master-001]
sudo -E /bin/bash -c "env PATH=$PATH crictl pull calico/cni:v3.27.3 --platform amd64"
18:32:34 CST stdout: [local-k8s-pre-master-001]
NAME:
   crictl pull - Pull an image from a registry

USAGE:
   crictl pull command [command options] NAME[:TAG|@DIGEST]

COMMANDS:
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --annotation value, -a value [ --annotation value, -a value ]  Annotation to be set on the pulled image
   --auth AUTH_STRING                                             Use AUTH_STRING for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]' [$CRICTL_AUTH]
   --creds USERNAME[:PASSWORD]                                    Use USERNAME[:PASSWORD] for accessing the registry [$CRICTL_CREDS]
   --pod-config pod-config.[json|yaml]                            Use pod-config.[json|yaml] to override the pull c
   --username USERNAME, -u USERNAME                               Use USERNAME for accessing the registry. The password will be requested on the command line      
   --help, -h                                                     show help
18:32:34 CST message: [local-k8s-pre-master-001]
downloading image: calico/node:v3.27.3
18:32:34 CST command: [local-k8s-pre-master-001]
sudo -E /bin/bash -c "env PATH=$PATH crictl pull calico/node:v3.27.3 --platform amd64"
18:32:34 CST stdout: [local-k8s-pre-master-001]
NAME:
   crictl pull - Pull an image from a registry

USAGE:
   crictl pull command [command options] NAME[:TAG|@DIGEST]

COMMANDS:
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --annotation value, -a value [ --annotation value, -a value ]  Annotation to be set on the pulled image
   --auth AUTH_STRING                                             Use AUTH_STRING for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]' [$CRICTL_AUTH]
   --creds USERNAME[:PASSWORD]                                    Use USERNAME[:PASSWORD] for accessing the registry [$CRICTL_CREDS]
   --pod-config pod-config.[json|yaml]                            Use pod-config.[json|yaml] to override the pull c
   --username USERNAME, -u USERNAME                               Use USERNAME for accessing the registry. The password will be requested on the command line      
   --help, -h                                                     show help

Additional information

No response

@tinpont tinpont added the bug Something isn't working label Aug 22, 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