Skip to content

Commit 425e719

Browse files
author
Yuvaraj Kakaraparthi
committed
doc updates for the new auto-discovery feature
1 parent f22d85e commit 425e719

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

docs/book/src/tasks/certs/auto-rotate-certificates-in-kcp.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
When using Kubeadm Control Plane provider (KCP) it is possible to configure automatic certificate rotations. KCP does this by triggering a rollout when the certificates on the control plane machines are about to expire.
44

5-
If configured, the certificate rollout feature is available for all new control plane machines created using ClusterAPI v1.3 and above. To enable it for existing control plane machines see [Enabling Certificate Expiry Rollout for Existing Control Plane Machines](#enabling-certificate-expiry-rollout-for-existing-control-plane-machines)
5+
If configured, the certificate rollout feature is available for all new and existing control plane machines.
66

77
### Configuring Machine Rollout
88

@@ -39,8 +39,8 @@ KCP uses the value in the corresponding Control Plane machine's `Machine.Status.
3939

4040
`Machine.Status.CertificatesExpiryDate` gets its value from one of the following 2 places:
4141

42-
* `machine.cluster.x-k8s.io/certificates-expiry` annotation value on the Machine object. This annotation is not applied by default and it can be set by users to opt-in in this feature for existing control plane machines (see instructions below).
43-
* `machine.cluster.x-k8s.io/certificates-expiry` annotation value on the Bootstrap Config object referenced by the machine. This value is automatically set for machines bootstrapped with CABPK with CAPI >= v1.3.
42+
* `machine.cluster.x-k8s.io/certificates-expiry` annotation value on the Machine object. This annotation is not applied by default and it can be set by users to manually override the certificate expiry information.
43+
* `machine.cluster.x-k8s.io/certificates-expiry` annotation value on the Bootstrap Config object referenced by the machine. This value is automatically set for machines bootstrapped with CABPK that are owned by the KCP resource.
4444

4545
The annotation value is a [RFC3339] format timestamp. The annotation value on the machine object, if provided, will take precedence.
4646

@@ -50,6 +50,8 @@ The annotation value is a [RFC3339] format timestamp. The annotation value on th
5050

5151
The time captured in the Bootstrap Config annotation is an approximate time at which the machine certificates will expire (1 year from creation). The time captured in the annotation will be a little earlier than the actual certificate expiry time.
5252

53+
It is assumed that all the certificates has the same expiration time. If not, it is assumed that the kube-apiserver certificate expires before other certificates.
54+
5355
</aside>
5456

5557
<aside class="note warning">
@@ -60,13 +62,5 @@ If the annotation is delete from the object, the certificate expiry information
6062

6163
</aside>
6264

63-
### Enabling Certificate Expiry Rollout for Existing Control Plane Machines
64-
65-
To enable rollout for certificate expiry to work on existing machines we need to update existing control plane machines with the current certificate expiry time. To do this do the following for each of the control plane machines:
66-
67-
* SSH into the control plane node and get the current certificate expiry time using `kubeadm certs check-expiration`. From the output note the certificate expiry time of the `apiserver` certificate.
68-
* Add the certificate expiry time as the `machine.cluster.x-k8s.io/certificates-expiry` annotation value on the control plane machine object. The value should be a [RFC3339] format timestamp.
69-
Example: If the certificate expiry time is `Sep 29, 2023 02:08 UTC` add `machine.cluster.x-k8s.io/certificates-expiry: 2023-09-29T02:08:00Z` as an annotation on the control plane machine object.
70-
7165
<!-- links -->
7266
[RFC3339]: https://www.ietf.org/rfc/rfc3339.txt

0 commit comments

Comments
 (0)