このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
06_virtualization:05_container:15_kubernetes_error [2022/04/19 02:18] – matsui | 06_virtualization:05_container:15_kubernetes_error [2022/05/24 06:29] (現在) – [対応] matsui | ||
---|---|---|---|
行 46: | 行 46: | ||
rm / | rm / | ||
systemctl restart containerd | systemctl restart containerd | ||
+ | kubeadm reset | ||
+ | |||
+ | |||
+ | ===== Warning | ||
+ | |||
+ | < | ||
+ | Warning | ||
+ | </ | ||
+ | |||
+ | ==== 対応1 ==== | ||
+ | |||
+ | taintが付いている可能性 | ||
+ | |||
+ | これはマスターはスケージュールしないというtaint | ||
+ | taintの後ろに「-」ハイフンを付けると、untaintする。 | ||
+ | < | ||
+ | # kubectl describe node g-master | grep -i taint | ||
+ | Taints: | ||
+ | |||
+ | #kubectl taint node g-master node-role.kubernetes.io/ | ||
+ | |||
+ | # kubectl describe node g-master | grep -i taint | ||
+ | Taints: | ||
+ | </ | ||
+ | |||
+ | ==== 対応2 ==== | ||
+ | |||
+ | STATUSがNotReady、これだとスケージュールされない | ||
+ | |||
+ | < | ||
+ | # kubectl get node | ||
+ | NAME | ||
+ | g-master | ||
+ | g-work01 | ||
+ | g-work02 | ||
+ | g-work03 | ||
+ | </ | ||
+ | |||
+ | fannelがapplyされてない可能性 | ||
+ | |||
+ | # kubectl apply -f https:// | ||
+ | |||
+ | |||
+ | ===== Initial timeout of 40s passed. ===== | ||
+ | |||
+ | kubeletが起動していない。。 | ||
+ | |||
+ | < | ||
+ | [wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/ | ||
+ | [kubelet-check] Initial timeout of 40s passed. | ||
+ | |||
+ | Unfortunately, | ||
+ | timed out waiting for the condition | ||
+ | |||
+ | This error is likely caused by: | ||
+ | - The kubelet is not running | ||
+ | - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled) | ||
+ | |||
+ | If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands: | ||
+ | - ' | ||
+ | - ' | ||
+ | |||
+ | Additionally, | ||
+ | To troubleshoot, | ||
+ | |||
+ | Here is one example how you may list all Kubernetes containers running in cri-o/ | ||
+ | - ' | ||
+ | Once you have found the failing container, you can inspect its logs with: | ||
+ | - ' | ||
+ | |||
+ | error execution phase wait-control-plane: | ||
+ | To see the stack trace of this error execute with --v=5 or higher | ||
+ | </ | ||
+ | |||
+ | ==== 対応1 ==== | ||
+ | |||
+ | systemctl start kubelet | ||
+ | |||
+ | ==== 対応2 ==== | ||
+ | |||
+ | こんなログが出ている場合。 | ||
+ | |||
+ | これは「--control-plane-endpoint」を指定している場合に出るエラーで、VIPが起動してないと思われる。 | ||
+ | |||
+ | VIPがないと、対象のcontrol-plane-endpointでマスターホストに接続できないからnot foundで出るよう。 | ||
+ | |||
+ | 一度下記などで、VIPを付けて試してみる。 | ||
+ | ip addr add [VIP] dev [Eth] | ||
+ | |||
+ | ※VIPだけ先に用意していおいて、後からipvsadmなどでVIP用意すれば良いと思う。 | ||
+ | |||
+ | < | ||
+ | # systemctl status kubelet | ||
+ | node \" | ||
+ | Apr 19 22:58:16 g-master02 kubelet[20595]: | ||
+ | </ | ||
+ | |||
+ | ===== failure loading certificate for CA: couldn' | ||
+ | |||
+ | < | ||
+ | W0421 22: | ||
+ | error execution phase preflight: | ||
+ | One or more conditions for hosting a new control plane instance is not satisfied. | ||
+ | |||
+ | [failure loading certificate for CA: couldn' | ||
+ | |||
+ | Please ensure that: | ||
+ | * The cluster has a stable controlPlaneEndpoint address. | ||
+ | * The certificates that must be shared among control plane instances are provided. | ||
+ | |||
+ | |||
+ | To see the stack trace of this error execute with --v=5 or higher | ||
+ | </ | ||
+ | |||
+ | ==== 対応 ==== | ||
+ | |||
+ | kubernetes controllerをjoinする時に出るエラー | ||
+ | |||
+ | |||
+ | [[06_virtualization: | ||
+ | #Master Join token再作成|Master Join token再作成]]をしれあげれば、joinできる。 | ||