kubeadm: How to get `kubeadm init` to not fail?
I am going through the setup procedure but when I run kubeadm init I am met by errors:
[init] Using Kubernetes version: v1.9.5
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
[preflight] Some fatal errors occurred:
[ERROR IsPrivilegedUser]: user is not running as root
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
I check what groups my user belongs to and it lists root as one of the groups:
sbrown@Dev-kube-01:~$ groups
sbrown root adm cdrom sudo dip plugdev lxd lpadmin sambashare docker
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 as root? Is it possible for me to modify my current user so that I can run kubeadm init without IsPrivilegedUser throwing an error?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (1 by maintainers)
kubeadm init --ignore-preflight-errors=all
It worked for me
Preflight check issue should be fixed by PR 58802
Temporary workaround for this issue is to switch off CRI check:
Docker is running fine, what’s confusing me is there appears to be a circular dependency when running
kubeadm init:[ERROR CRI]: unable to check if the container runtime at "/var/run/dockershim.sock" is running: exit status 1[ERROR Port-10250]: Port 10250 is in useEDIT: I did some more debugging by running kubelet and then using
crictl statsresulted in the following error:getting status of runtime failed: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeServiceThat error lead me to this issue which indicates that I have the wrong crictl version installed!!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.