Recently in one of the Kubernetes clusters, I have executed the below command to check the expiry date of the internal certificates.

kubeadm certs check-expiration

On executing the above command, I got the following error.

unknown command "certs" for "kubeadm"
To see the stack trace of this error execute with --v=5 or higher

The command certs was not available in the kubeadm. There are a set of preview options available in kubeadm. I have fixed the error by executing the below command. Adding an option alpha fixed the issue.

kubeadm alpha certs check-expiration

The above command displays the details of the certificate with its expiry dates in a Kubernetes cluster.

A Sample response of the above command is given below.

I hope this is useful.