我要评分
获取效率
正确性
完整性
易理解

Failed to Load Certificate During Kubernetes Cluster Initialization

Symptom

"failed to load certificate: couldn't load the certificate file /etc/kubernetes/pki/apiserver.crt: open /etc/kubernetes/pki/apiserver.crt: no such file or directory" is reported during cluster initialization.

Key Process and Cause Analysis

An apiserver.cert file is automatically generated by the Kubeadm component. This problem occurs because the residual configuration file in the environment is not cleared.

Conclusion and Solution

Delete the $HOME/.kube/config file and run the kubeadm reset command.