This KB article details the procedure for using a script to remediate an incorrect platform ingress certificate
VCF Automation 9.1.x
VCF Automation 9.0.x
VCF services runtime
This issue typically occurs when an invalid or incorrect certificate is applied. Common reasons include:
1. Incorrect Hostname or Subject Alternative Name (SAN)
2. Expired certificate
3. Self-signed or untrusted certificate
This KB should be used when the VMSP platform ingress is serving an incorrect certificate, which can manifest as:
This document is intended to remediate the following cases:
Please run the attach cert-remediation.sh to renew the certificate.
1. Take a ssh to the VCFA node.
2. Copy the attached script into /tmp folder.
3. Change the permission of the file. chmod +x cert-remediation.sh
4. Run the below command to execute the script:
./cert-remediation.sh
*** INFO SHA1 and MD5 sum of the cert-remediation.sh
Algorithm Hash Path
--------- ---- ----
MD5 B0BFE0B9226F6896CD3BBB5D19B9FACB cert-remediation.sh
SHA1 9ECB8EBF699C6E7960D58F67E142299899B2C8AA cert-remediation.sh
| Option | File | Contents |
|---|---|---|
| --cert-file | Full chain | Your server certificate first, then the intermediate(s), optionally the root. |
| --key-file | Private key | The key you generated with the CSR. Must be unencrypted. |
| --ca-file | Root CA | The root CA certificate only (subject equals issuer). |
Your CA may send these as separate files. Build the chain yourself if needed:
cat your_domain.crt intermediate.crt > fullchain.pem
All files must be PEM (text with -----BEGIN ...----- lines). Convert .pfx, .p7b or .der files first.
# certificate and key match (the two hashes must be identical; RSA keys) openssl x509 -noout -modulus -in fullchain.pem | openssl sha1 openssl rsa -noout -modulus -in key.pem | openssl sha1 # certificate covers your FQDN, and its expiry openssl x509 -noout -subject -ext subjectAltName -enddate -in fullchain.pem # chain validates against the root openssl verify -CAfile ca.pem fullchain.pem
The VCFA certificate should cover both <vcfa-fqdn> and *.<vcfa-fqdn>, because VCFA routes serve both hostnames.
for f in *.pem; do echo "== $f ($(grep -c 'BEGIN CERTIFICATE' $f) certs)" openssl x509 -in $f -noout -subject -issuer done
The root is the certificate whose subject= and issuer= are identical. The chain file has your FQDN in the subject of its first certificate.
./cert-remediation-vcfa.sh --platform-fqdn <fqdn> --ingress-type <type> \
--cert-file <path> --key-file <path> --ca-file <path> \
--password <password> [options]| Option | Description |
|---|---|
| --platform-fqdn | Platform FQDN. The script signs in and calls the API here. |
| --cert-file | Full chain PEM. |
| --key-file | Private key PEM. |
| --ca-file | Root CA PEM. |
| --password | Password for the API user. |
| Option | Default | Description |
|---|---|---|
| --ingress-type | platform | platform, fleet, instance or vcfa. |
| --vcfa-fqdn | --platform-fqdn | VCFA FQDN, used for the final certificate check. |
| --username | [email protected] | API user. |
| --namespace | prelude | Namespace holding the ingress-vcfa-tls* secrets (vcfa only). |
| --skip-resync | off | vcfa only: don't force the Kyverno resync. |
| --component-id | discovered | Skips component discovery. |
| --timeout | 600 | Seconds to wait for the apply task. |
| --no-wait | off | Don't wait for the task. |
| --dry-run | off | Print the payload and component ID, make no changes. |
./cert-remediation-vcfa.sh --platform-fqdn <platform-fqdn> --ingress-type vcfa \ --vcfa-fqdn <vcfa-fqdn> \ --cert-file fullchain.pem --key-file key.pem --ca-file ca.pem \ --password '<password>' --dry-run
To replace the other certificates, use --ingress-type platform, fleet or instance (no --vcfa-fqdn needed).