Renew Certificates for Local Clusters
Kubernetes uses SSL certificates to secure the communication between different components of a cluster. Using these certificates allows Kubernetes to secure API connections, verify the authenticity of the nodes, and encrypt connections. All certificates have an expiry date, and need to be renewed periodically.
This page guides you through the different methods used to renew certificates in a local Palette Edge cluster. An local cluster is a cluster that has no connection to a Palette instance. For information on how to renew certificates on centrally managed Edge clusters, refer to Renew Cluster PKI Certificates.
Limitations
- Automatic renewal covers the Kubernetes certificates of control plane nodes and the per-node mutual TLS (mTLS) certificates. Renewing certificates from Local UI or through the Edge Management API covers only the Kubernetes certificates of control plane nodes. Renewing the Kubernetes certificates of worker nodes is not supported.
- Kubernetes generates the Kubernetes certificates. You cannot use your own Kubernetes certificates.
View Cluster Certificates
Local UI lists the certificates of your cluster with their expiration dates, so that you can check them without connecting to the Edge host over SSH. In addition to the Kubernetes certificates, the list includes the following certificates if your cluster uses them:
- The Local UI server certificate.
- The per-node mTLS certificates that secure the communication between Edge hosts.
- The registry certificates in the Registry Connect pack, such as the certificates of a Zot or Harbor primary registry.
Prerequisites
- You have an active cluster in a locally managed Edge host.
- You have access to Local UI for the Edge host. For more information, refer to Access Local UI.
Check Certificate Expiration
-
Log in to Local UI.
-
From the left main menu, select Cluster.
-
Select the Overview tab on the Cluster page.
-
In the Certificates row, select View Certificates. The Certificates window groups the certificates of your cluster by the certificate authority (CA) that issued them. Expand a CA to view its certificates.
-
Review the certificate details. Use the search box and the Type and Renewal filters to narrow the list.
Column Description Certificate The name of the certificate. Type The certificate type, such as Kubernetes, Local UI, or mTLS. Issued Date The date when the CA issued the certificate. Expiration Date The date when the certificate expires, and the number of days until it expires. Local UI highlights the number of days as a warning when fewer than 30 days remain, and as an error after the certificate expires. Renewal Automatic if Palette Edge renews the certificate before it expires. Not available if Palette Edge does not renew the certificate. Upcoming renewal date The date when Palette Edge renews the certificate, 30 days before it expires. This column is empty for certificates that Palette Edge does not renew. Source The Edge host that the certificate belongs to, for per-node certificates.
Certificate Warnings and Renewal Status
Local UI warns you when one or more certificates are close to their expiration date or have expired:
- A warning icon next to View Certificates on the Overview tab. Hover over the icon to view the details.
- A banner in the Certificates window.
- A banner and a warning icon on the Cluster card of the Edge Host page.
When Kubernetes certificates expire, the cluster might stop running. Renew them manually to restore normal operation. Refer to Manual Renewal.
The per-node mTLS certificates show Automatic in the Renewal column. They are valid for 10 years, and Palette Edge renews them 30 days before they expire.
The Local UI server certificate shows Not available in the Renewal column. It is valid for 10 years, and you can renew it manually. Refer to Renew the Local UI Server Certificate.
The registry certificates also show Not available in the Renewal column, even when cert-manager rotates the server certificate of a Zot or Harbor primary registry. With TLS certificate rotation enabled on the registry, cert-manager renews the server certificate 15 days before it expires by default. Without rotation, the Zot or Harbor server certificate is valid for 365 days. To enable rotation, refer to Enable Automatic TLS Certificate Rotation on the Zot Primary Registry or Enable Automatic TLS Certificate Rotation on the Harbor Primary Registry.
To retrieve the same certificate details programmatically, use the
GET /v1/edge-mgmt/cluster/certificates endpoint of the Edge Management API.
Automatic Renewal
Palette Edge automatically renews the certificates that show Automatic in the Renewal column. It renews them 30 days before they expire. Use the following steps to check when the next automatic renewal happens.
Prerequisite
- You have an active cluster in a locally managed Edge host.
- You have access to Local UI for the Edge host. For more information, refer to Access Local UI.
Check Next Auto Renewal Time
-
Log in to Local UI.
-
From the left main menu, select Cluster.
-
Select the Overview tab on the Cluster page.
-
In the Certificates row, select View Certificates. The Certificates window groups the certificates of your cluster by the CA that issued them. Expand a CA to view its certificates.
-
In the Upcoming renewal date column, check when Palette Edge renews each certificate.
Validate
On the Overview tab, select View Certificates in the Certificates row. The Certificates window lists the certificates that your cluster uses. Confirm that the renewed certificates show a new Issued Date and a later Expiration Date.
Manual Renewal
You can also manually renew your certificates whenever you want. You can do this through Local UI or through the Edge Management API.
Prerequisite
- You have an active local Edge cluster.
- You have access to Local UI for the Edge host. For more information, refer to Access Local UI.
Manually Renew Certificates
- Local UI
- API
-
Log in to Local UI.
-
From the left main menu, select Cluster.
-
Select the Overview tab on the Cluster page.
-
In the Certificates row, select View Certificates. The Certificates window lists the certificates that your cluster uses.
-
Select Renew all available certificates, and then select Confirm. Local UI renews only the Kubernetes certificates of the control plane nodes.
-
Issue the following command to call the Edge Management authentication API. Replace
edge-host-ipwith the IP of your Edge host and replaceos-usernameandos-passwordwith your Operating System (OS) user credentials.curl --location 'https://edge-host-ip:5080/v1/users/default/login' \
--header 'Content-Type: application/json' \
--data '{
"username": "os-username",
"password": "os-password"
}'This will return an authentication token.
{
"Token": {
"Authorization": "******"
}
} -
Issue the following command to call the endpoint to renew your control plane node certificates. Put the authentication token you obtained in the previous step in the header.
curl -X POST "https://edge-host-ip:5080/v1/edge-mgmt/cluster/renew-certificates" \
--header "Authorization: *******"The request renews only the Kubernetes certificates of the control plane nodes.
Validate
On the Overview tab, select View Certificates in the Certificates row. The Certificates window lists the certificates that your cluster uses. Confirm that the renewed certificates show a new Issued Date and a later Expiration Date.
Renew the Local UI Server Certificate
The Local UI server certificate secures the HTTPS connection to Local UI on each Edge host. Palette Edge does not renew it before it expires, and Renew all available certificates does not include it. When the Palette agent starts, it creates a new certificate if the current one is missing, has expired, or does not include the IP address of the Edge host. The CA that signs the certificate does not change, so browsers that trust the CA continue to trust Local UI.
Prerequisites
- You have the credentials and network access to establish an SSH connection to your Edge host, and you can run commands
with
sudo. - You have access to Local UI for the Edge host. For more information, refer to Access Local UI.
Renew the Certificate
-
Establish an SSH connection to the Edge host.
-
Back up the current certificate and key, so that you can restore them if the Palette agent cannot create a new certificate. To restore them, copy them back to
/opt/spectrocloud/certs/stylus-agent/and restart the Palette agent service.sudo cp /opt/spectrocloud/certs/stylus-agent/server.pem /opt/spectrocloud/certs/stylus-agent/server.key /root/ -
Remove the certificate and key.
sudo rm /opt/spectrocloud/certs/stylus-agent/server.pem /opt/spectrocloud/certs/stylus-agent/server.key -
Restart the Palette agent service. The agent creates a new certificate and key when it starts. Local UI is unavailable while the agent restarts.
sudo systemctl restart spectro-stylus-agent.service -
Repeat steps 1 - 4 on each Edge host whose Local UI server certificate you want to renew.
Validate
-
Log in to Local UI.
-
From the left main menu, select Cluster, and then select the Overview tab.
-
In the Certificates row, select View Certificates.
-
In the Source column, find the Local UI certificate of each Edge host that you renewed. Confirm that it shows a new Issued Date and a later Expiration Date.