To provide the steps for rotating the TKGI API certificate when using the TKGI Management Console
Symptoms:
When logged in to the TKGI Management Console and viewing the Clusters tab, you see the following error on the UI:
Failed to retrieve current TKGI Instance clusters. cannot get TKGI client: cannot login into TKGI: Post https://<IP-ADDRESS>:8443/oauth/token: x509: certificate has expired or is not yet valid
Perform the following steps to rotate the TKGI API cert in the Management Console:
If this is a custom cert, that cert will need to be regenerated by the customer.
Once regenerated:
If this is a self-signed cert by the Opsmanager:
After populating the TKGI Tile -> TKGI API tab in Opsmanager above, complete the process in TKGI Management Console:
There is a case where the applied changes have been completed on the Opsman UI and the private key is not visible under UI.
The public/private key can be found under the pivotal-container-serviceVM
:/var/vcap/jobs/pks-api/config# cat /var/vcap/jobs/uaa/config/uaa.crt
-----BEGIN CERTIFICATE-----
MIIDojCCAoqgAwIBAgIVAI38Ze9ql2NWs8JikaVx2D5TTN85MA0GCSqGSIb3DQEB
....
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAyRgHJ9ZCq4C2UEEb5sIoXodx2vVwuKymmhFW8tl4mhLbXLp5
....
-----END RSA PRIVATE KEY-----
Use the above cert and key to update the Management console with the public and private keys