Skip to content

Commit 7e70bc2

Browse files
feat: add rotate expiring certificates (#905)
* feat: add rotate expiring certificates Signed-off-by: PoAn Yang <[email protected]> * Update docs/advanced/settings.md Co-authored-by: Jillian Maroket <[email protected]> Signed-off-by: PoAn Yang <[email protected]> * Update docs/advanced/settings.md Co-authored-by: Jillian Maroket <[email protected]> Signed-off-by: PoAn Yang <[email protected]> * Update docs/host/host.md Co-authored-by: Jillian Maroket <[email protected]> Signed-off-by: PoAn Yang <[email protected]> * Update docs/host/host.md Co-authored-by: Jillian Maroket <[email protected]> Signed-off-by: PoAn Yang <[email protected]> * address comment Signed-off-by: PoAn Yang <[email protected]> --------- Signed-off-by: PoAn Yang <[email protected]> Signed-off-by: PoAn Yang <[email protected]> Co-authored-by: Jillian Maroket <[email protected]>
1 parent bd042e7 commit 7e70bc2

File tree

8 files changed

+193
-20
lines changed

8 files changed

+193
-20
lines changed

docs/advanced/settings.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ The following example adds disks that match the glob pattern `/dev/sd*` or `/dev
6464

6565
**Definition**: Setting that allows you to automatically rotate certificates for RKE2 services. This setting is disabled by default.
6666

67-
Use the field `expiringInHours` to specify the validity period of each certificate (`1` to `8759` hours). Harvester automatically replaces the certificate before the specified period ends.
67+
Use the field `expiringInHours` to specify the validity period of each certificate (`1` to `8759` hours). If the certificate expires within the specified period, Harvester automatically replaces the certificate.
6868

6969
For more information, see the **Certificate Rotation** section of the [Rancher](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/manage-clusters/rotate-certificates) and [RKE2](https://docs.rke2.io/advanced#certificate-rotation) documentation.
7070

71+
If your certificates have expired, you can [rotate them manually](../host/host.md#rotate-expiring-certificates).
72+
7173
**Default value**: `{"enable":false,"expiringInHours":240}`
7274

7375
**Example**:
@@ -823,7 +825,7 @@ https://your.upgrade.checker-url/v99/checkupgrade
823825
- `restoreVM`: Option that enables Harvester to automatically restore previously running [non-migratable virtual machines](../vm/live-migration.md#non-migratable-virtual-machines) after the upgrade is *successfully* completed. You can specify either of the following values:
824826

825827
- `true`: Harvester forcibly shuts down *running* and *paused* non-migratable virtual machines on each node. After the upgrade is completed, the previously running virtual machines are automatically restarted, while the paused virtual machines remain shut down.
826-
828+
827829
- `false`: This is the default value. In multi-node environments, you must stop all non-migratable virtual machines to allow the upgrade to proceed. Harvester does not restart these virtual machines after the upgrade is completed.
828830

829831
:::note

docs/host/host.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,3 +589,51 @@ You can configure the URL of the console for remote server management. This cons
589589
1. Click **Console** to access the remote server.
590590

591591
![](/img/remote_console_button.png)
592+
593+
## Rotate Expired Certificates
594+
595+
If the RKE2 certificates have expired, you cannot use the `auto-rotate-rke2-certificates` setting to rotate them. The setting only works when the cluster (`cluster.provisioning`) is marked `Ready`.
596+
597+
```
598+
> kubectl get cluster.provisioning -n fleet-local local -o yaml | yq -e '.status.conditions[] | select(.type=="Ready")'
599+
lastUpdateTime: "2025-10-22T06:41:33Z"
600+
status: "True"
601+
type: Ready
602+
```
603+
604+
If the `status` field's value is `False`, you must manually rotate the certificates by following these steps on each node:
605+
606+
1. Log in to the node using the root account.
607+
608+
1. Stop the RKE2 service.
609+
610+
- Management nodes
611+
```
612+
systemctl stop rke2-server
613+
```
614+
- Worker nodes
615+
```
616+
systemctl stop rke2-agent
617+
```
618+
619+
1. Rotate the RKE2 certificates.
620+
621+
```
622+
/opt/rke2/bin/rke2 certificate rotate
623+
```
624+
625+
1. Start the RKE2 service.
626+
627+
- Management nodes
628+
```
629+
systemctl start rke2-server
630+
```
631+
- Worker nodes
632+
```
633+
systemctl start rke2-agent
634+
```
635+
636+
1. Restart the `rancher-system-agent` service.
637+
```
638+
systemctl restart rancher-system-agent
639+
```

versioned_docs/version-v1.4/advanced/settings.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ The following example adds disks that match the glob pattern `/dev/sd*` or `/dev
6464

6565
**Definition**: Setting that allows you to automatically rotate certificates for RKE2 services. This setting is disabled by default.
6666

67-
Use the field `expiringInHours` to specify the validity period of each certificate (`1` to `8759` hours). Harvester automatically replaces the certificate before the specified period ends.
67+
Use the field `expiringInHours` to specify the validity period of each certificate (`1` to `8759` hours). If the certificate expires within the specified period, Harvester automatically replaces the certificate.
6868

6969
For more information, see the **Certificate Rotation** section of the [Rancher](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/manage-clusters/rotate-certificates) and [RKE2](https://docs.rke2.io/advanced#certificate-rotation) documentation.
7070

71+
If your certificates have expired, you can [rotate them manually](../host/host.md#rotate-expiring-certificates).
72+
7173
**Default value**: `{"enable":false,"expiringInHours":240}`
7274

7375
**Example**:
@@ -78,7 +80,7 @@ For more information, see the **Certificate Rotation** section of the [Rancher](
7880

7981
### `backup-target`
8082

81-
**Definition**: Custom backup target used to store VM backups.
83+
**Definition**: Custom backup target used to store VM backups.
8284

8385
For more information, see the [Longhorn documentation](https://longhorn.io/docs/1.6.0/snapshots-and-backups/backup-and-restore/set-backup-target/#set-up-aws-s3-backupstore).
8486

@@ -122,7 +124,7 @@ https://172.16.0.1/v3/import/w6tp7dgwjj549l88pr7xmxb4x6m54v5kcplvhbp9vv2wzqrrjhr
122124

123125
### `containerd-registry`
124126

125-
**Definition**: Configuration of a private registry created for the Harvester cluster.
127+
**Definition**: Configuration of a private registry created for the Harvester cluster.
126128

127129
The value is stored in the `registries.yaml` file of each node (path: `/etc/rancher/rke2/registries.yaml`). For more information, see [Containerd Registry Configuration](https://docs.rke2.io/install/private_registry) in the RKE2 documentation.
128130

@@ -207,7 +209,7 @@ Changing this setting might cause single-node clusters to temporarily become una
207209
- Proxy URL for HTTPS requests: `"httpsProxy": "https://<username>:<pswd>@<ip>:<port>"`
208210
- Comma-separated list of hostnames and/or CIDRs: `"noProxy": "<hostname | CIDR>"`
209211

210-
You must specify key information in the `noProxy` field if you configured the following options or settings:
212+
You must specify key information in the `noProxy` field if you configured the following options or settings:
211213

212214
| Configured option/setting | Required value in `noProxy` | Reason |
213215
| --- | --- | --- |
@@ -254,7 +256,7 @@ debug
254256

255257
**Definition**: Setting that enables and disables the Longhorn V2 Data Engine.
256258

257-
When set to `true`, Harvester automatically loads the kernel modules required by the Longhorn V2 Data Engine, and attempts to allocate 1024 × 2 MiB-sized huge pages (for example, 2 GiB of RAM) on all nodes.
259+
When set to `true`, Harvester automatically loads the kernel modules required by the Longhorn V2 Data Engine, and attempts to allocate 1024 × 2 MiB-sized huge pages (for example, 2 GiB of RAM) on all nodes.
258260

259261
Changing this setting automatically restarts RKE2 on all nodes but does not affect running virtual machine workloads.
260262

@@ -263,7 +265,7 @@ Changing this setting automatically restarts RKE2 on all nodes but does not affe
263265
If you encounter error messages that include the phrase "not enough hugepages-2Mi capacity", allow some time for the error to be resolved. If the error persists, reboot the affected nodes.
264266

265267
To disable the Longhorn V2 Data Engine on specific nodes (for example, nodes with less processing and memory resources), go to the **Hosts** screen and add the following label to the target nodes:
266-
268+
267269
- label: `node.longhorn.io/disable-v2-data-engine`
268270
- value: `true`
269271

@@ -308,7 +310,7 @@ Changes to the server address list are applied to all nodes.
308310

309311
**Definition**: Percentage of physical compute, memory, and storage resources that can be allocated for VM use.
310312

311-
Overcommitting is used to optimize physical resource allocation, particularly when VMs are not expected to fully consume the allocated resources most of the time. Setting values greater than 100% allows scheduling of multiple VMs even when physical resources are notionally fully allocated.
313+
Overcommitting is used to optimize physical resource allocation, particularly when VMs are not expected to fully consume the allocated resources most of the time. Setting values greater than 100% allows scheduling of multiple VMs even when physical resources are notionally fully allocated.
312314

313315
**Default values**: `{ "cpu":1600, "memory":150, "storage":200 }`
314316

@@ -517,7 +519,7 @@ If you misconfigure this setting and are unable to access the Harvester UI and A
517519

518520
**Supported options and values**:
519521

520-
- `protocols`: Enabled protocols.
522+
- `protocols`: Enabled protocols.
521523
- `ciphers`: Enabled ciphers.
522524

523525
For more information about the supported options, see [`ssl-protocols`](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#ssl-protocols) and [`ssl-ciphers`](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#ssl-ciphers) in the Ingress-Nginx Controller documentation.
@@ -688,7 +690,7 @@ When the cluster is upgraded in the future, the contents of the `value` field ma
688690

689691
**Versions**: v1.2.0 and later
690692

691-
**Definition**: Additional namespaces that you can use when [generating a support bundle](../troubleshooting/harvester.md#generate-a-support-bundle).
693+
**Definition**: Additional namespaces that you can use when [generating a support bundle](../troubleshooting/harvester.md#generate-a-support-bundle).
692694

693695
By default, the support bundle only collects resources from the following predefined namespaces:
694696

@@ -731,7 +733,7 @@ You can specify a value greater than or equal to 0. When the value is 0, Harvest
731733

732734
**Versions**: v1.3.1 and later
733735

734-
**Definition**: Number of minutes Harvester allows for collection of logs and configurations (Harvester) on the nodes for the support bundle.
736+
**Definition**: Number of minutes Harvester allows for collection of logs and configurations (Harvester) on the nodes for the support bundle.
735737

736738
If the collection process is not completed within the allotted time, Harvester still allows you to download the support bundle (without the uncollected data). You can specify a value greater than or equal to 0. When the value is 0, Harvester uses the default value.
737739

@@ -772,7 +774,7 @@ https://your.upgrade.checker-url/v99/checkupgrade
772774
**Supported options and fields**:
773775

774776
- `imagePreloadOption`: Options for the image preloading phase.
775-
777+
776778
The full ISO contains the core operating system components and all required container images. Harvester can preload these container images to each node during installation and upgrades. When workloads are scheduled to management and worker nodes, the container images are ready to use.
777779

778780
- `strategy`: Image preload strategy.
@@ -788,10 +790,10 @@ https://your.upgrade.checker-url/v99/checkupgrade
788790
If you decide to use `skip`, ensure that the following requirements are met:
789791

790792
- You have a private container registry that contains all required images.
791-
- Your cluster has high-speed internet access and is able to pull all images from Docker Hub when necessary.
792-
793+
- Your cluster has high-speed internet access and is able to pull all images from Docker Hub when necessary.
794+
793795
Note any potential internet service interruptions and how close you are to reaching your [Docker Hub rate limit](https://www.docker.com/increase-rate-limits/). Failure to download any of the required images may cause the upgrade to fail and may leave the cluster in a middle state.
794-
796+
795797
:::
796798

797799
- `parallel` (**experimental**): Nodes preload images in batches. You can adjust this using the `concurrency` option.
@@ -841,7 +843,7 @@ https://your.upgrade.checker-url/v99/checkupgrade
841843

842844
### `vm-force-reset-policy`
843845

844-
**Definition**: Setting that allows you to force rescheduling of a VM when the node that it is running on becomes unavailable.
846+
**Definition**: Setting that allows you to force rescheduling of a VM when the node that it is running on becomes unavailable.
845847

846848
When the state of the node changes to `Not Ready`, the VM is force deleted and rescheduled to an available node after the configured number of seconds.
847849

versioned_docs/version-v1.4/host/host.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,3 +625,42 @@ You can configure the URL of the console for remote server management. This cons
625625
1. Click **Console** to access the remote server.
626626
627627
![](/img/remote_console_button.png)
628+
629+
## Rotate Expired Certificates
630+
631+
If the RKE2 certificates have expired, you cannot use the `auto-rotate-rke2-certificates` setting to rotate them. The setting only works when the cluster (`cluster.provisioning`) is marked `Ready`.
632+
633+
```
634+
> kubectl get cluster.provisioning -n fleet-local local -o yaml | yq -e '.status.conditions[] | select(.type=="Ready")'
635+
lastUpdateTime: "2025-10-22T06:41:33Z"
636+
status: "True"
637+
type: Ready
638+
```
639+
If the `status` field's value is `False`, you must manually rotate the certificates by following these steps on each node:
640+
1. Log in to the node using the root account.
641+
1. Stop the RKE2 service.
642+
- Management nodes
643+
```
644+
systemctl stop rke2-server
645+
```
646+
- Worker nodes
647+
```
648+
systemctl stop rke2-agent
649+
```
650+
1. Rotate the RKE2 certificates.
651+
```
652+
/opt/rke2/bin/rke2 certificate rotate
653+
```
654+
1. Start the RKE2 service.
655+
- Management nodes
656+
```
657+
systemctl start rke2-server
658+
```
659+
- Worker nodes
660+
```
661+
systemctl start rke2-agent
662+
```
663+
1. Restart the `rancher-system-agent` service.
664+
```
665+
systemctl restart rancher-system-agent
666+
```

versioned_docs/version-v1.5/advanced/settings.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ The following example adds disks that match the glob pattern `/dev/sd*` or `/dev
6464

6565
**Definition**: Setting that allows you to automatically rotate certificates for RKE2 services. This setting is disabled by default.
6666

67-
Use the field `expiringInHours` to specify the validity period of each certificate (`1` to `8759` hours). Harvester automatically replaces the certificate before the specified period ends.
67+
Use the field `expiringInHours` to specify the validity period of each certificate (`1` to `8759` hours). If the certificate expires within the specified period, Harvester automatically replaces the certificate.
6868

6969
For more information, see the **Certificate Rotation** section of the [Rancher](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/manage-clusters/rotate-certificates) and [RKE2](https://docs.rke2.io/advanced#certificate-rotation) documentation.
7070

71+
If your certificates have expired, you can [rotate them manually](../host/host.md#rotate-expiring-certificates).
72+
7173
**Default value**: `{"enable":false,"expiringInHours":240}`
7274

7375
**Example**:

versioned_docs/version-v1.5/host/host.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,3 +593,42 @@ You can configure the URL of the console for remote server management. This cons
593593
1. Click **Console** to access the remote server.
594594

595595
![](/img/remote_console_button.png)
596+
597+
## Rotate Expired Certificates
598+
599+
If the RKE2 certificates have expired, you cannot use the `auto-rotate-rke2-certificates` setting to rotate them. The setting only works when the cluster (`cluster.provisioning`) is marked `Ready`.
600+
601+
```
602+
> kubectl get cluster.provisioning -n fleet-local local -o yaml | yq -e '.status.conditions[] | select(.type=="Ready")'
603+
lastUpdateTime: "2025-10-22T06:41:33Z"
604+
status: "True"
605+
type: Ready
606+
```
607+
If the `status` field's value is `False`, you must manually rotate the certificates by following these steps on each node:
608+
1. Log in to the node using the root account.
609+
1. Stop the RKE2 service.
610+
- Management nodes
611+
```
612+
systemctl stop rke2-server
613+
```
614+
- Worker nodes
615+
```
616+
systemctl stop rke2-agent
617+
```
618+
1. Rotate the RKE2 certificates.
619+
```
620+
/opt/rke2/bin/rke2 certificate rotate
621+
```
622+
1. Start the RKE2 service.
623+
- Management nodes
624+
```
625+
systemctl start rke2-server
626+
```
627+
- Worker nodes
628+
```
629+
systemctl start rke2-agent
630+
```
631+
1. Restart the `rancher-system-agent` service.
632+
```
633+
systemctl restart rancher-system-agent
634+
```

versioned_docs/version-v1.6/advanced/settings.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ The following example adds disks that match the glob pattern `/dev/sd*` or `/dev
6464

6565
**Definition**: Setting that allows you to automatically rotate certificates for RKE2 services. This setting is disabled by default.
6666

67-
Use the field `expiringInHours` to specify the validity period of each certificate (`1` to `8759` hours). Harvester automatically replaces the certificate before the specified period ends.
67+
Use the field `expiringInHours` to specify the validity period of each certificate (`1` to `8759` hours). If the certificate expires within the specified period, Harvester automatically replaces the certificate.
6868

6969
For more information, see the **Certificate Rotation** section of the [Rancher](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/manage-clusters/rotate-certificates) and [RKE2](https://docs.rke2.io/advanced#certificate-rotation) documentation.
7070

71+
If your certificates have expired, you can [rotate them manually](../host/host.md#rotate-expiring-certificates).
72+
7173
**Default value**: `{"enable":false,"expiringInHours":240}`
7274

7375
**Example**:
@@ -823,7 +825,7 @@ https://your.upgrade.checker-url/v99/checkupgrade
823825
- `restoreVM`: Option that enables Harvester to automatically restore previously running [non-migratable virtual machines](../vm/live-migration.md#non-migratable-virtual-machines) after the upgrade is *successfully* completed. You can specify either of the following values:
824826

825827
- `true`: Harvester forcibly shuts down *running* and *paused* non-migratable virtual machines on each node. After the upgrade is completed, the previously running virtual machines are automatically restarted, while the paused virtual machines remain shut down.
826-
828+
827829
- `false`: This is the default value. In multi-node environments, you must stop all non-migratable virtual machines to allow the upgrade to proceed. Harvester does not restart these virtual machines after the upgrade is completed.
828830

829831
:::note

versioned_docs/version-v1.6/host/host.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,3 +589,42 @@ You can configure the URL of the console for remote server management. This cons
589589
1. Click **Console** to access the remote server.
590590

591591
![](/img/remote_console_button.png)
592+
593+
## Rotate Expired Certificates
594+
595+
If the RKE2 certificates have expired, you cannot use the `auto-rotate-rke2-certificates` setting to rotate them. The setting only works when the cluster (`cluster.provisioning`) is marked `Ready`.
596+
597+
```
598+
> kubectl get cluster.provisioning -n fleet-local local -o yaml | yq -e '.status.conditions[] | select(.type=="Ready")'
599+
lastUpdateTime: "2025-10-22T06:41:33Z"
600+
status: "True"
601+
type: Ready
602+
```
603+
If the `status` field's value is `False`, you must manually rotate the certificates by following these steps on each node:
604+
1. Log in to the node using the root account.
605+
1. Stop the RKE2 service.
606+
- Management nodes
607+
```
608+
systemctl stop rke2-server
609+
```
610+
- Worker nodes
611+
```
612+
systemctl stop rke2-agent
613+
```
614+
1. Rotate the RKE2 certificates.
615+
```
616+
/opt/rke2/bin/rke2 certificate rotate
617+
```
618+
1. Start the RKE2 service.
619+
- Management nodes
620+
```
621+
systemctl start rke2-server
622+
```
623+
- Worker nodes
624+
```
625+
systemctl start rke2-agent
626+
```
627+
1. Restart the `rancher-system-agent` service.
628+
```
629+
systemctl restart rancher-system-agent
630+
```

0 commit comments

Comments
 (0)