K8s cluster setup error: error: kubectl get CSR no resources found
Problem cause and solution test successful
problem
kubectl get csr
No resources found.
reason
because the original SSL certificate is invalid after restart, if it is not deleted, kubelet cannot communicate with the master even after restart
Solution:
cd /opt/kubernetes/ssl
ls
kubelet-client-2021-04-14-08-41-36.pem kubelet-client-current.pem kubelet.crt kubelet.key
# Delete all certificates
rm -rf *
# close or open the kubelet
systemctl stop kubelet
master01
kubectl delete clusterrolebinding kubelet-bootstrap
clusterrolebinding.rbac.authorization.k8s.io "kubelet-bootstrap" deleted
kubectl create clusterrolebinding kubelet-bootstrap --clusterrole=system:node-bootstrapper --user=kubelet-bootstrap
clusterrolebinding.rbac.authorization.k8s.io/kubelet-bootstrap created
node
#open kubelet
#node01
bash kubelet.sh 192.168.238.82
#node02
bash kubelet.sh 192.168.238.83
Test successful
master01
kubectl get csr
NAME AGE REQUESTOR CONDITION
node-csr-mJwuqA7DAf4UmB1InN_WEYhFWbQKOqUVXg9Bvc7Intk 4s kubelet-bootstrap Pending
node-csr-ydhzi9EG9M_Ozmbvep0ledwhTCanppStZoq7vuooTq8 11s kubelet-bootstrap Pending
Done!!!
Read More:
- How to Solve kubelet starts error (k8s Cluster Restarted)
- [Solved] K8s Initialize Error: failed with error: Get “http://localhost:10248/healthz“
- [Solved] kubectl error: sou-bash: _get_comp_words_by_ref: command not found
- K8s cluster initialization error: Port 6443 is in use [Solved]
- [Solved] Ubuntu 20.04 LTS Install k8s Error: The connection to the server localhost:8080 was refused
- [Solved] k8s error retrieving resource lock default/fuseim.pri-ifs: Unauthorized
- k8s kubernetes ingress error: endpoints “default-http-backend“ not found
- [Solved] k8s kubeadmin init Error: http://localhost:10248/healthz‘ failed
- How to Solve k8s Nodal issues: /sys/fs/cgroup/memory/docker: no space left on device\““: unknown.
- [Solved] kubectl top pod error: error: Metrics API not available
- K8s ❉ Error: cannot be handled as a** [How to Solve]
- K8s initializing the master & worker node error [How to Solve]
- K8s Install Error: Error: unknown flag: –experimental-upload-certs
- [Solved] k8s Error: Back-off restarting failed container
- How to Solve Redis Cluster Build Error
- [Solved] Upstream connect error or disconnect occurs after the k8s istio virtual machine is restarted
- [Solved] K8s Error: ERROR: Unable to access datastore to query node configuration
- K8S error validating data: ValidationError(Deployment.spec): missing required field selector
- jitpack.io ERROR: No build artifacts found [How to Solve]
- K8S Master Initialize Error: [ERROR CRI]: container runtime is not running: output: E0812