Skip to main content
⎈K8sCalc

kubernetes

Kubernetes Certificate Expiry Calculator

Calculate when your Kubernetes certificates expire and whether you need to renew them. kubeadm certificates are valid for 1 year — missing renewal breaks the cluster.

✓Content reviewed Jul 18, 2026

Related tool

K8s Cluster Cost

Calculate the monthly cost of running a self-managed Kubernetes cluster on Hetzner Cloud, Vultr, or DigitalOcean. Choose server types for control planes, workers, and load balancers with HA mode.

Kubernetes PKI Certificate Management

Kubernetes uses a PKI (Public Key Infrastructure) to secure all internal communication. kubeadm generates these certificates at cluster creation with a 1-year validity period.

Certificates kubeadm Issues

CertificatePurposeValidity
apiserverAPI server TLS1 year
apiserver-kubelet-clientAPI server → kubelet auth1 year
apiserver-etcd-clientAPI server → etcd auth1 year
etcd-serveretcd peer + client TLS1 year
front-proxy-clientAPI aggregation layer1 year

The CA Certificate

The root CA certificate is valid for 10 years (not 1 year). You cannot renew the CA with kubeadm certs renew — replacing it requires rotating all cluster certificates. This is a major operation. Plan for CA rotation every 8–9 years.

Automatic Renewal via Upgrade

kubeadm upgrade apply automatically renews certificates expiring within 6 months. This is the primary reason you should upgrade Kubernetes regularly — annual minor version upgrades keep certificates healthy.

Emergency Renewal

If certificates are already expired, the process is:

  1. 1.Restore a valid kubeconfig if kubectl is broken (copy from /etc/kubernetes/admin.conf)
  2. 2.Run kubeadm certs renew all
  3. 3.Restart control plane pods
  4. 4.Distribute new kubeconfig to users

Certificate Monitoring

Add a Prometheus alert on x509_cert_expiry metric (exposed by cert-manager or kube-state-metrics) to get alerts 30, 14, and 7 days before expiry.

Worked example: Cert Expiry

What the calculator returns for its default inputs — change any value in the form above to recalculate.

InputValue
Days Since Cluster Install / Last Upgrade180 days
Certificate Validity Period365 days — kubeadm default (1 year)
ResultValue
Certificate statusHEALTHY
Days until expiry185 days
Weeks remaining26 weeks
Validity period used49%
Recommended actionNo action required — renew within 30 days of expiry
Renewal commandkubeadm certs renew all

How the calculation works

kubeadm issues the API server, kubelet-client and etcd certificates with 1 year of validity by default (the CA certificates get 10 years).

  • ›Days remaining = validity period − days since the certificates were issued.
  • ›Status thresholds: expired at 0 days; critical at 30 days or less; warning at 90 days or less; otherwise healthy.
  • ›Validity used = days since issue ÷ validity period.

Check the real dates on a control-plane node with kubeadm certs check-expiration. Every kubeadm upgrade apply renews the certificates, so clusters upgraded at least once a year rarely hit expiry; clusters that are never upgraded do.

Frequently Asked Questions

How do I check when my Kubernetes certificates expire?

Run `kubeadm certs check-expiration` on a control plane node. It shows expiry dates for all certificates including the API server cert, etcd certs, and the front-proxy cert.

What happens when Kubernetes certificates expire?

When the API server certificate expires, kubectl stops working entirely — the API server refuses connections. etcd certificate expiry is even more severe — the entire cluster becomes read-only then unavailable. Renew before 30 days remaining.

Does upgrading Kubernetes renew certificates automatically?

Yes — kubeadm upgrade apply automatically renews all certificates that expire within 6 months during the upgrade. This is why regular minor version upgrades are important for certificate hygiene.

How do I renew certificates without upgrading?

Run `kubeadm certs renew all` on each control plane node, then restart the static pods: `crictl pods | grep kube | awk '{print $1}' | xargs crictl stopp`. The API server, scheduler, and controller-manager will restart with new certs.

Related Tools

Related Guides