#Checks for wcp/tls and kubernetes/pki certificates
find /etc -type f \( -name "*.cert" -o -name "*.crt" \) | xargs -L 1 -t -i bash -c 'openssl x509 -noout -text -in {}|grep After'
#Check for the kubelet certificate's expiration
openssl x509 -noout -text -in /var/lib/kubelet/pki/kubelet.crt | grep After
#Checks that the admin.conf file's certificates are not expired
cat /etc/kubernetes/admin.conf | grep certificate-authority-data | awk '{print $2}' | base64 -d | openssl x509 -noout -text | grep After
cat /etc/kubernetes/admin.conf | grep client-certificate-data | awk '{print $2}' | base64 -d | openssl x509 -noout -text | grep After
#Retrieve the ID of the Supervisor Cluster to check its certificates
./certmgr supervisors
#Use certmgr to list the certificates for the Supervisor Cluster
./certmgr certificates list -c <domain id for the supervisor cluster>
Example output of the above command:
/root/certmgr certificates list
time="2025-12-03T09:27:59Z" level=info msg="[/root/certmgr certificates list]"
+--------------+--------------+----------------------------------+------------------------------------------------------------------+-------------------------------+-----------+
| SCOPE | IP | HOSTNAME | NAME | NOTAFTER | ISEXPIRED |
+--------------+--------------+----------------------------------+------------------------------------------------------------------+-------------------------------+-----------+
| controlplane | ##.###.##.## | <Supervisor-Node-Name> | /etc/kubernetes/admin.conf(client-certificate-data) | 2026-12-03 07:08:42 +0000 UTC | false |
| | | | /etc/kubernetes/controller-manager.conf(client-certificate-data) | 2026-12-03 07:08:42 +0000 UTC | false |
| | | | /etc/kubernetes/pki/front-proxy-client.crt | 2026-12-03 07:08:42 +0000 UTC | false |
| | | | /etc/kubernetes/pki/apiserver.crt | 2026-12-03 07:08:42 +0000 UTC | false |
| | | | /etc/kubernetes/pki/apiserver-etcd-client.crt | 2026-12-03 07:08:42 +0000 UTC | false |
Kubernetes certificates are set to expire after a year by default. VMware by Broadcom Kubernetes products adhere to this certificate expiry timeline.
Config Status' is Running and 'Host Config Status' is Running. See Workload Management configuration monitoringReady. See Connect to the Supervisor Cluster as a vCenter Single Sign-On User/root/) where vSphere with Tanzu is deployed. (Use WinSCP from Windows OS if required):$ scp ./wcp_cert_manager.zip root@##.##.##.##:/root
If you encounter an issue using WinSCP, see the following KB article: Connecting to vCenter Server Virtual Appliance using WinSCP fails/root and unzip the file:$ unzip wcp_cert_manager.zip
Archive: wcp_cert_manager.zip
inflating: certmgr
$ ls -l
total 30956
-rwxr-xr-x 1 root root 23019418 MM DD HH:MM certmgr
-rw-r--r-- 1 root root 8675846 MM DD HH:MM wcp_cert_manager.zip
$ ./certmgr supervisors
YYYY/MM/DD HH:MM:DD Cluster: domain-c#:########-####-####-####-#############
An example of running the tool on a specific cluster would be:
./certmgr certificates rotate -c domain-c#:########-####-####-####-#############
/usr/lib/vmware-wcp/hypercrypt.py --reencrypt
NOTE: In a Legacy vSphere 7.0 environments, since hypercrypt.py lacks the reencrypt option, create reencrypt.py as a substitute and run that Python script:
Create reencrypt.py as follows:
# cat <<EOF>> reencrypt.py
import os
from subprocess import run
import yaml
fh=open("/etc/vmware/wcp/secrets-config.yaml")
config=yaml.load(fh, Loader=yaml.FullLoader)
for file_id, file_info in config["files"].items():
if isinstance(file_info, dict):
path = file_info["path"]
else:
path = file_info
if os.path.exists(path):
run(["/usr/lib/vmware-wcp/hypercrypt.py", "--file-name", file_id, "--read", path])
EOF
# Press Ctrl+D to finish editing reencrypt.py.
Run reencrypt.py
python ./reencrypt.py
certmgr Usage GuideWCP Certificates Manager is a CLI tool for provisioning, viewing, and rotating certificates for VMware Cloud Platform (WCP) on vCenter or Supervisor Control Plane VMs.
The tool is designed to be run from vCenter, and it can automatically copy itself to control plane VMs to execute commands remotely when needed.
| Flag | Short | Description |
|---|---|---|
--debug |
-d |
Enable debug logging |
--leader |
-l |
Toggle this command runner as a leader (only applies on control plane VMs) |
--json |
-j |
Enable JSON output |
certmgr versionDisplay version information.
certmgr version
certmgr supervisorsLists all Supervisors in the system.
certmgr supervisors
certmgr supervisors list
list – Lists all Supervisors in the systemcopy [CLUSTER_ID] – Copies this program to all Supervisor control plane VMs. If a cluster ID is provided, only targets that cluster.certmgr supervisors copy
certmgr supervisors copy domain-c123
certmgr certificatesCertificate management commands for Supervisors.
| Flag | Short | Description |
|---|---|---|
--cluster |
-c |
vSphere cluster ID to target |
listLists all certificates.
certmgr certificates list
certmgr certificates list --json
certmgr certificates list -c domain-c123
check-expirationChecks the expiration of all certificates.
certmgr certificates check-expiration
certmgr certificates check-expiration --days 30
certmgr certificates check-expiration --json
| Flag | Short | Default | Description |
|---|---|---|---|
--days |
-e |
30 | Duration in days from now to consider certificates in need of rotation |
--json |
false | Output in JSON format |
backupBackup all certificates to the specified directory.
certmgr certificates backup
certmgr certificates backup --backup-dir /custom/backup/path
| Flag | Default | Description |
|---|---|---|
--backup-dir |
/etc/kubernetes/pki.bak |
Directory to use for certificate backups (must exist) |
rotateRotates all certificates.
certmgr certificates rotate
certmgr certificates rotate --backup-dir /custom/backup/path
certmgr certificates rotate --spherelet-only
certmgr certificates rotate --vmca
| Flag | Short | Default | Description |
|---|---|---|---|
--backup-dir |
/etc/kubernetes/pki.bak |
Directory for certificate backups | |
--vmca |
-v |
false | [Experimental] Rotates VMCA-signed certificates |
--spherelet-only |
-s |
false | Only rotate spherelet certificates |
--json |
false | Output in JSON format |
certmgr tkcCommands for Tanzu Kubernetes Clusters (guest clusters).
| Flag | Short | Description |
|---|---|---|
--namespace |
-n |
Namespace to use for cluster operations (defaults to current context namespace) |
listLists clusters in the system.
certmgr tkc list
certmgr tkc list -n my-namespace
certmgr tkc list --all-namespaces
| Flag | Short | Description |
|---|---|---|
--all-namespaces |
-a |
List clusters across all namespaces |
certificates list NAMEList control plane certificates for a guest cluster.
certmgr tkc certificates list my-cluster
certmgr tkc certificates list my-cluster -n my-namespace
certificates rotate NAMERotate control plane certificates for a guest cluster.
certmgr tkc certificates rotate my-cluster
certmgr tkc certificates rotate my-cluster -n my-namespace
certmgr certificates check-expiration --days 60
certmgr certificates backup --backup-dir /tmp/cert-backup
certmgr certificates rotate --backup-dir /tmp/cert-backup
certmgr certificates rotate -c domain-c123
certmgr tkc list --all-namespaces
certmgr tkc certificates list my-tkc-cluster -n my-namespace
certmgr tkc certificates rotate my-tkc-cluster -n my-namespace
"Error running supervisor cert manager: error while running CPVM cmd: Error running cmd on (##.##.##.##): /tmp/certmgr certificates list --json, error: Process exited with status 127"/etc/vmware/wcp/tls/authproxy-client.crt and /etc/vmware/wcp/tls/pinniped.crt certificates on the Supervisor control plane VMs are not renewed by the certmgr script.