TKGm 2.5.4
Harbor certificate has expired
Before proceeding with the steps, please make sure to verify the details like namespace, package name, package version, secret name, etc., match your environment and update them accordingly.
namespace="tanzu-system-registry" secret='harbor-tls' encoded_cert=$(kubectl get secret $secret -n $namespace -o jsonpath='{.data.tls\.crt}') decoded_cert=$(echo "$encoded_cert" | base64 -d | openssl x509 -noout -dates -serial -issuer -subject -ext subjectAltName) echo "$decoded_cert" > before-harbor-server-cert-rotate.out
tanzu package installed get harbor \ --namespace tanzu-system-registry \ --values-file-output values.yml
tlsCertificate.tls.crtandtlsCertificate.tls.keyinvalues.yamlextracted in the previous step.tanzu package installed update harbor \ --version 2.8.4+vmware.1-tkg.1 \ --values-file values.yml \ --namespace tanzu-system-registry
harbor-tls update will be displayed. Example output12:22:53PM: Deploy started 12:22:54PM: Deploying | Target cluster 'https://100.64.0.1:443' (nodes: wld-kubevip-controlplane-c4dzk-tx87n, 4+) | Changes | Namespace Name Kind Age Op Op st. Wait to Rs Ri | tanzu-system-registry harbor-tls Secret 1h update - reconcile ok - | Op: 0 create, 0 delete, 1 update, 0 noop, 0 exists | Wait to: 1 reconcile, 0 delete, 0 noop | 12:22:54PM: ---- applying 1 changes [0/1 done] ---- | **12:22:54PM: update secret/harbor-tls (v1) namespace: tanzu-system-registry** | 12:22:54PM: ---- waiting on 1 changes [0/1 done] ---- | 12:22:54PM: ok: reconcile secret/harbor-tls (v1) namespace: tanzu-system-registry | 12:22:54PM: ---- applying complete [1/1 done] ---- | 12:22:54PM: ---- waiting complete [1/1 done] ---- | Succeeded 12:22:54PM: Deploy succeeded
namespace="tanzu-system-registry" secret='harbor-tls' encoded_cert=$(kubectl get secret $secret -n $namespace -o jsonpath='{.data.tls\.crt}') decoded_cert=$(echo "$encoded_cert" | base64 -d | openssl x509 -noout -dates -serial -issuer -subject -ext subjectAltName) echo "$decoded_cert" > after-harbor-server-cert-rotate.out