Argo CD Argo CD server certificate expired

The TLS certificate for the Argo CD server has expired.

Understanding Argo CD

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. It automates the deployment of desired application states from Git repositories, ensuring that the live state of applications matches the desired state defined in Git. This tool is essential for managing Kubernetes applications and ensuring that deployments are consistent and reliable.

Identifying the Symptom

One common issue users may encounter is an expired TLS certificate for the Argo CD server. This can manifest as an inability to access the Argo CD web UI or API, often accompanied by security warnings in the browser or connection errors in the CLI.

Common Error Messages

When the TLS certificate expires, you might see error messages such as:

  • ERR_CERT_DATE_INVALID in browsers
  • certificate has expired in CLI tools

Exploring the Issue

The root cause of this issue is straightforward: the TLS certificate used by the Argo CD server has reached its expiration date. Certificates are crucial for establishing secure connections, and an expired certificate can lead to security vulnerabilities and access issues.

Why Certificates Expire

Certificates are issued with a validity period to ensure that they are regularly updated, which helps maintain security standards. Once expired, they must be renewed to continue providing secure connections.

Steps to Resolve the Issue

To resolve this issue, you need to renew the TLS certificate and update the Argo CD server configuration. Follow these steps:

Step 1: Generate a New Certificate

First, generate a new TLS certificate. You can use tools like Certbot or your preferred certificate authority to obtain a new certificate. Ensure that the certificate is valid for the domain used by your Argo CD server.

Step 2: Update the Argo CD Server Configuration

Once you have the new certificate, update the Argo CD server configuration:

kubectl -n argocd patch secret argocd-secret \
-p '{"data": {"tls.crt": "", "tls.key": ""}}'

Replace <base64-encoded-certificate> and <base64-encoded-key> with your new certificate and key, encoded in base64.

Step 3: Restart the Argo CD Server

After updating the secret, restart the Argo CD server to apply the changes:

kubectl -n argocd rollout restart deployment argocd-server

Conclusion

By following these steps, you can renew your TLS certificate and restore secure access to your Argo CD server. Regularly monitoring certificate expiration dates and automating renewals can help prevent this issue in the future. For more information on managing TLS certificates in Kubernetes, visit the Kubernetes documentation.

Never debug

Argo CD

manually again

Let Dr. Droid create custom investigation plans for your infrastructure.

Book Demo
Automate Debugging for
Argo CD
See how Dr. Droid creates investigation plans for your infrastructure.

MORE ISSUES

Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid