When attempting to rotate cluster certificates using the command tkgi rotate-certificates <cluster> --all
, the Last Action State of the cluster shows "failed"
, and the PKS API logs contain the following error:"Unknown error occurred rotating nsx certs"
"Hostname <hostname> not verified"
This issue prevents successful certificate rotation.
This error occurs due to an invalid NSX Manager CA certificate. The CA certificate is configured in two locations within the TKGi tile:
Option 1: Fix the Certificate Issue
To resolve the error, ensure that the correct and valid NSX Manager CA certificate is configured in both the TKGi and BOSH tiles.
Option 2: Skip NSX Certificate Rotation
If the NSX-T certificates have not expired, you can skip their rotation while rotating other cluster certificates by running the rotation command with the --skip-nsx
flag.
Option 3: Adjust NSX Manager CA Certificate Settings to Prevent Rotation Errors
In TKGi Documentation, the NSX Manager CA Cert field and the Disable SSL Certificate Verification option are intended to be mutually exclusive. Incorrect configuration can lead to the "Hostname not verified"
error during certificate rotation.
Key Configuration Rules:
How to Avoid the Error During Certificate Rotation:
Following these guidelines ensures TKGi behaves as expected during certificate rotation and prevents "Hostname not verified"
errors.