-
Notifications
You must be signed in to change notification settings - Fork 716
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
How to get kubeadm init
to not fail?
#733
Comments
I just went ahead and used the root account; now I encounter other errors:
I'm fine with disabling swap, but I was confused about the CRI issue and based on some quick searching it seemed as though the crictl tool required some configuring but the installation instructions has no remarks about crictl, i.e. how Kubernetes is using crictl, what problem crictl solves, what the point of dockershim.sock is, who is expected to create dockershim.sock for crictl, etc. OK so disabling the swap and cri pre-flight checks makes things get a little further, except now I notice that despite pre-pulling the docker images (as mentioned here), Kubernetes still tries to pull the images anyway and fails. The kubeadm init reference page seems to imply that pre-pulling the images is sufficient, but it isn't, although Not trying to complain, just trying to understand how to set this tool up and have a place to document issues so that at a future time when I need to set it up I can refer here. Help in understanding these issues is appreciated. |
Container runtime is required for the kubelet to launch the pods on a node. Runtime exposes interfaces for the kubelet to schedule containers and manage the state of the pods. One of the container runtime is docker. Kubernetes installation instruction has the information to setup the docker (under the heading Installing Docker). More information about CRI |
I already went through the instructions for installing kubeadm and that didn't give me any issues, although I was wondering if Docker CE 17.03 is an absolute, or if I could get away with using 17.12.1 CE (which is the one that was already installed on the server). That blog post on the CRI really helped me understand its role, thank you. The only thing that's still unclear is whether or not I'm expected to create I still am having trouble getting |
I found some unofficial documentation which lists some environment variables that looked promising but the environment variables have no effect: I look at the manifest files that kubeadm generates and the images that are referenced are all still EDIT: Going back to the kubeadm documentation, I decided to try passing in a config file to
EDIT 2: or at least I thought it solved my issue. Kubeadm looks like it's going to my registry to pull the images but it still is reporting:
Could this be because it doesn't trust the certificate that my private registry is using? Is there a way to upload the CA cert into kubernetes so that it trusts the cert my registry presents? Those images that it refers to in the error message are valid, i.e. I run |
OK I wrongly assumed from that error message that the error was in pulling the images: it actually looks like it's because kubelet wasn't running:
So in a new terminal I ran Oddly enough kubeadm still fails the cri preflight check: So does |
Kubeadm init will start pods for etcd, dns and cni on the master node. For this it requires dockershim.sock. I suggest you to install docker ce on the master before initializing kubeadm |
Docker is running fine, what's confusing me is there appears to be a circular dependency when running
EDIT: I did some more debugging by running kubelet and then using EDIT 2: Actually according to this matrix I do have the correct version (1.0.0-alpha.0) so I guess I still am confused how to resolve this apparent circular dependency. |
That circular dependency is also mentioned here: kubernetes-sigs/cri-tools#153 (comment) It looks like a bug in kubeadm. It shouldn't run cri pre-flight check before running kubelet as dockershim.sock seems to be created by kubelet. |
ok so that is a bug, thanks for clarifying that |
kubeadm init
?kubeadm init
to not fail?
I am also having the same issue where the preflight check is looking for The following runs successfully:
|
Preflight check issue should be fixed by PR 58802 Temporary workaround for this issue is to switch off CRI check:
|
Thanks for the pointers, I'll try them out if I revisit Kubernetes (or maybe by then it'll be easier to set up) |
Hi friends, Error: |
^ it tells you here. try |
Yes --ignore-preflight-errors=NumCPU worked for me. I installed kubernetes initialization. Thank You. |
kubeadm init --ignore-preflight-errors=all It worked for me |
sudo kubeadm init --ignore-preflight-errors=all |
On offical docs of kubeadm, there is no mention of |
I am going through the setup procedure but when I run
kubeadm init
I am met by errors:I check what groups my user belongs to and it lists
root
as one of the groups:I am a novice with Ubuntu so I'm having trouble making sense of this error: why does kubernetes not think my user is privileged? Does the error mean that I'll have to run
sudo kubeadm init...
or does it intend for me to run everything asroot
? Is it possible for me to modify my current user so that I can runkubeadm init
withoutIsPrivilegedUser
throwing an error?The text was updated successfully, but these errors were encountered: