The role creates /etc/containerd/config.toml with the command containerd config default but then the command kubeadmin init falis.
Error message:
{"changed": true, "cmd": ["kubeadm", "init", "--config=/tmp/k8s_ansible/kubeadm-config.yaml"], "delta": "0:00:00.522020", "end": "2022-11-02 07:57:42.970618", "msg": "non-zero return code", "rc": 1, "start": "2022-11-02 07:57:42.448598", "stderr": "error execution phase preflight: [preflight] Some fatal errors occurred:\n\t[ERROR CRI]: container runtime is not running: output: E1102 07:57:42.752076 2098 remote_runtime.go:948] \"Status from runtime service failed\" err=\"rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService\"\ntime=\"2022-11-02T07:57:42Z\" level=fatal msg=\"getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService\"\n, error: exit status 1\n[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`\nTo see the stack trace of this error execute with --v=5 or higher", "stderr_lines": ["error execution phase preflight: [preflight] Some fatal errors occurred:", "\t[ERROR CRI]: container runtime is not running: output: E1102 07:57:42.752076 2098 remote_runtime.go:948] \"Status from runtime service failed\" err=\"rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService\"", "time=\"2022-11-02T07:57:42Z\" level=fatal msg=\"getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService\"", ", error: exit status 1", "[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`", "To see the stack trace of this error execute with --v=5 or higher"], "stdout": "[init] Using Kubernetes version: v1.24.1\n[preflight] Running pre-flight checks", "stdout_lines": ["[init] Using Kubernetes version: v1.24.1", "[preflight] Running pre-flight checks"]}
The role creates
/etc/containerd/config.toml
with the commandcontainerd config default
but then the commandkubeadmin init
falis.Error message:
This article https://stackoverflow.com/questions/49658051/kubeadm-join-unable-to-check-if-the-container-runtime says delete the config.toml.
Deleting the config.toml and restarting containerd fixes this, but I'm not sure if this has side effects.