Replace an expired certificate

Replace an expired TLS certificate for Cloudbees CI on Kubernetes. Identify the TLS secret used by your Gateway listener, delete it, and recreate it with the new certificate and key in the same namespace.

1 minute readSecurity

If the certificate that you used to configure HTTPS during installation is near expiration, follow these steps to replace the certificate.

  1. Type the following command to get the name of the TLS secret, for example, cloudbees-core-example-com-tls:

    kubectl describe ing cjoc -n cloudbees-core

  2. Type the following command to remove the expired certificate:

    kubectl delete secret cloudbees-core-example-com-tls -n cloudbees-core

  3. Type the following command to recreate the secret with the new certificate:

    kubectl create secret tls cloudbees-core-example-com-tls --key [your-new-key] --cert [your-new-cert] -n cloudbees-core