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

kubeadm init clone project to local compilation error #266

Closed
devbiu opened this issue Oct 17, 2023 · 11 comments
Closed

kubeadm init clone project to local compilation error #266

devbiu opened this issue Oct 17, 2023 · 11 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@devbiu
Copy link

devbiu commented Oct 17, 2023

What happened?

download kubernetes-1.24.17.tar.gz to local environment
use commond

KUBE_BUILD_PLATFORMS=linux/amd64 make all GOFLAGS=-v GOGCFLAGS="-N -l" 

compile
kubeadm config images list view require images as follow
image
because only the tag in the docker is 1.24.17 image, use the tag command to modify the tag of the image
image
enable corresponding images and tags

subsequent execution commond

kubeadm init

alter still asks me to pull images
image

What did you expect to happen?

kubernetes install success

How can we reproduce it (as minimally and precisely as possible)?

KUBE_BUILD_PLATFORMS=linux/amd64 make all GOFLAGS=-v GOGCFLAGS="-N -l" 
kubeadm init

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
# Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.17", GitCommit:"22a9682c8fe855c321be75c5faacde343f909b04", GitTreeState:"clean", BuildDate:"2023-10-16T11:32:47Z", GoVersion:"go1.20.7", Compiler:"gc", Platform:"linux/amd64"}

Cloud provider

red Hat Linux

OS version

# On Linux:
$ cat /etc/os-release
# red Hat Enterprise Linux release 8.3
$ uname -a
# Linux xxxxx  x86_64 x86_64 x86_64 GNU/Linux

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

@devbiu devbiu added the kind/bug Categorizes issue or PR as related to a bug. label Oct 17, 2023
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Oct 17, 2023
@k8s-ci-robot
Copy link
Contributor

There are no sig labels on this issue. Please add an appropriate label by using one of the following commands:

  • /sig <group-name>
  • /wg <group-name>
  • /committee <group-name>

Please see the group list for a listing of the SIGs, working groups, and committees available.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 17, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@neolit123
Copy link
Member

neolit123 commented Oct 17, 2023

/kind support
/transfer registry.k8s.io

note there are number of similar issues. it's not a kubeadm bug, but a problem with your internet or registry.k8s.io
https://github.com/kubernetes/registry.k8s.io/issues
#262

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Oct 17, 2023
@k8s-ci-robot k8s-ci-robot transferred this issue from kubernetes/kubernetes Oct 17, 2023
@BenTheElder
Copy link
Member

It looks like your local DNS server is refusing requests?

@devbiu
Copy link
Author

devbiu commented Oct 18, 2023

It looks like your local DNS server is refusing requests?

because the local network cannot connect to the Internet

So I imported the required image in advance so that it cannot be downloaded remotely

and using image pull policy IfNotPresent

So should I no longer pull images from remote locations?

@neolit123
Copy link
Member

So I imported the required image in advance so that it cannot be downloaded remotely

did you import them in the k8s.io namespace?

@devbiu
Copy link
Author

devbiu commented Oct 18, 2023

So I imported the required image in advance so that it cannot be downloaded remotely

did you import them in the k8s.io namespace?

This is okay for me
I mistakenly understood that the runtime of kubadm is docker, but the actual runtime is containerd.
So after I imported the image into the k8s namespace k8s.io through ctr, modified its tag through the command
as follows
image

I re-executed

kubeadm init --v=5 

and was able to find the image.

Thank you for your answer

@devbiu
Copy link
Author

devbiu commented Oct 18, 2023

What puzzles me is why the runtime is containerd instead of docker. As far as I know, lower versions of kubernetes import the image into docker instead of ctr. Can you explain it to me?

@neolit123
Copy link
Member

What puzzles me is why the runtime is containerd instead of docker. As far as I know, lower versions of kubernetes import the image into docker instead of ctr. Can you explain it to me?

docker is no longer supported by default by kubeadm and core kubernetes. there is a new container runtime "shim" called cri-dockerd that is needed.
if you used kubeadm config images pull ..., then kubeadm would use crictl to download the images in the container runtime it found. probably in your case it only found the containerd socket.

closing as not a bug
/close

@k8s-ci-robot
Copy link
Contributor

@neolit123: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

@neolit123: Closing this issue.

In response to this:

What puzzles me is why the runtime is containerd instead of docker. As far as I know, lower versions of kubernetes import the image into docker instead of ctr. Can you explain it to me?

docker is no longer supported by default by kubeadm and core kubernetes. there is a new container runtime "shim" called cri-dockerd that is needed.
if you used kubeadm config images pull ..., then kubeadm would use crictl to download the images in the container runtime it found. probably in your case it only found the containerd socket.

closing as not a bug
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

4 participants