<p>Suddenly an entire Kubernetes cluster (Azure's AKS-solution) became unresponsive.
When running <code>kubectl</code> commands, the result is <code>kubectl x509 certificate has expired or is not yet valid</code>.
Nothing in Azure Portal indicates an unhealthy state.</p>

Kent Munthe Caspersen
<p>The quick solution:</p>
<p><code>az aks rotate-certs -g $RESOURCE_GROUP_NAME -n $CLUSTER_NAME</code></p>
<p>When certificates have been rotated, you can use <code>kubectl</code> again.</p>
<p>Be ready to wait 30 minutes before the cluster fully recovers.</p>
<p>Full explanation can be found in this article:</p>
<p><a href="https://learn.microsoft.com/en-us/azure/aks/certificate-rotation" rel="noreferrer">https://learn.microsoft.com/en-us/azure/aks/certificate-rotation</a></p>
