<p>After I renew the kubernetes v1.21 cluster certificate like this:</p>
<pre><code>[root@k8smasterone ~]# kubeadm certs renew all
[renew] Reading configuration from the cluster...
[renew] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[renew] Error reading configuration from the Cluster. Falling back to default configuration

certificate embedded in the kubeconfig file for the admin to use and for kubeadm itself renewed
certificate for serving the Kubernetes API renewed
certificate the apiserver uses to access etcd renewed
certificate for the API server to connect to kubelet renewed
certificate embedded in the kubeconfig file for the controller manager to use renewed
certificate for liveness probes to healthcheck etcd renewed
certificate for etcd nodes to communicate with each other renewed
certificate for serving etcd renewed
certificate for the front proxy client renewed
certificate embedded in the kubeconfig file for the scheduler manager to use renewed

Done renewing certificates. You must restart the kube-apiserver, kube-controller-manager, kube-scheduler and etcd, so that they can use the new certificates.
</code></pre>
<p>and restart the master node kubelet like this <code>systemctl restart kubelet</code>. when I using this command to get pods info, shows error like this:</p>
<pre><code>[root@k8smasterone ~]# kubectl get pods
E0804 14:18:49.784346    9986 memcache.go:265] couldn't get current server API group list: the server has asked for the client to provide credentials
E0804 14:18:49.785400    9986 memcache.go:265] couldn't get current server API group list: the server has asked for the client to provide credentials
E0804 14:18:49.786149    9986 memcache.go:265] couldn't get current server API group list: the server has asked for the client to provide credentials
E0804 14:18:49.787951    9986 memcache.go:265] couldn't get current server API group list: the server has asked for the client to provide credentials
E0804 14:18:49.789820    9986 memcache.go:265] couldn't get current server API group list: the server has asked for the client to provide credentials
error: You must be logged in to the server (the server has asked for the client to provide credentials)
</code></pre>
<p>Am I missing something? what should I do to solve this issue? should I regenerate a new token?</p>

Dolphin
<pre class="lang-bash prettyprint-override"><code>cp /etc/kubernetes/admin.conf ~/.kube/config
</code></pre>
<p>kubectl default use config file <code>~/.kube/config</code>, that included a client cert.<br />
After you renew all cert, that client cert became invalid.<br />
you need the new admin client cert.</p>
