<p>I'm using <code>kubectl</code> to access the api server on my minikube cluster on ubuntu
but when try to use <code>kubectl</code> command I got an error certificate expired:</p>
<pre><code>/home/ayoub# kubectl get pods
Unable to connect to the server: x509: certificate has expired or is not yet valid: current time 2021-08-30T14:39:50+01:00 is before 2021-08-30T14:20:10Z
</code></pre>
<p>Here's my kubectl config:</p>
<pre><code>/home/ayoub# kubectl config view
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: DATA+OMITTED
    server: https://127.0.0.1:16443
  name: microk8s-cluster
contexts:
- context:
    cluster: microk8s-cluster
    user: admin
  name: microk8s
current-context: microk8s
kind: Config
preferences: {}
users:
- name: admin
  user:
    token: REDACTED
root@ayoub-Lenovo-ideapad-720S-13IKB:/home/ayoub#    /home/ayoub# kubectl config view
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: DATA+OMITTED
    server: https://127.0.0.1:16443
  name: microk8s-cluster
contexts:
- context:
    cluster: microk8s-cluster
    user: admin
  name: microk8s
current-context: microk8s
kind: Config
preferences: {}
users:
- name: admin
  user:
    token: REDACTED
root@ayoub-Lenovo-ideapad-720S-13IKB:/home/ayoub#
</code></pre>
<p>How I can renew this certificate?</p>

e2rabi
<p>minikube delete - deletes the local Kubernetes cluster - worked for me</p>
<p>reference:
<b> <a href="https://github.com/kubernetes/minikube/issues/10122#issuecomment-758227950" rel="nofollow noreferrer">https://github.com/kubernetes/minikube/issues/10122#issuecomment-758227950</a> </b></p>
