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.
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.
When the TLS certificate expires, you might see error messages such as:
ERR_CERT_DATE_INVALID
in browserscertificate has expired
in CLI toolsThe 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.
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.
To resolve this issue, you need to renew the TLS certificate and update the Argo CD server configuration. Follow these steps:
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.
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.
After updating the secret, restart the Argo CD server to apply the changes:
kubectl -n argocd rollout restart deployment argocd-server
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.
Let Dr. Droid create custom investigation plans for your infrastructure.
Book Demo