<p>My kubernetes PKI expired (API server to be exact) and I can't find a way to renew it. The error I get is</p>

<pre><code>May 27 08:43:51 node1 kubelet[8751]: I0527 08:43:51.922595    8751 server.go:417] Version: v1.14.2
May 27 08:43:51 node1 kubelet[8751]: I0527 08:43:51.922784    8751 plugins.go:103] No cloud provider specified.
May 27 08:43:51 node1 kubelet[8751]: I0527 08:43:51.922800    8751 server.go:754] Client rotation is on, will bootstrap in background
May 27 08:43:51 node1 kubelet[8751]: E0527 08:43:51.925859    8751 bootstrap.go:264] Part of the existing bootstrap client certificate is expired: 2019-05-24 13:24:42 +0000 UTC
May 27 08:43:51 node1 kubelet[8751]: F0527 08:43:51.925894    8751 server.go:265] failed to run Kubelet: unable to load bootstrap
kubeconfig: stat /etc/kubernetes/bootstrap-kubelet.conf: no such file or directory
</code></pre>

<p>The documentation on <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/" rel="noreferrer">https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/</a> describes how to renew but it only works if the API server is not expired. I have tried to do a </p>

<pre><code>kubeadm alpha cert renew all
</code></pre>

<p>and do a reboot but that just made the entire cluster fail so I did a rollback to a snapshot (my cluster is running on VMware).</p>

<p>The cluster is running and all containers seem to work but I can't access it via kubectl so I can't really deploy or query.</p>

<p>My kubernetes version is 1.14.2.</p>

<p>So the solution was to (first a backup)</p>

<pre><code>$ cd /etc/kubernetes/pki/
$ mv {apiserver.crt,apiserver-etcd-client.key,apiserver-kubelet-client.crt,front-proxy-ca.crt,front-proxy-client.crt,front-proxy-client.key,front-proxy-ca.key,apiserver-kubelet-client.key,apiserver.key,apiserver-etcd-client.crt} ~/
$ kubeadm init phase certs all --apiserver-advertise-address &lt;IP&gt;
$ cd /etc/kubernetes/
$ mv {admin.conf,controller-manager.conf,kubelet.conf,scheduler.conf} ~/
$ kubeadm init phase kubeconfig all
$ reboot
</code></pre>

<p>then</p>

<pre><code>$ cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
</code></pre>

<p>that did the job for me and thanks for your hints :)</p>
