-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77406 from tmalove/etcd-osdocs-10055-tlove
[OSDOCS#10055]: Document manual rotation of etcd signer certificates
- Loading branch information
Showing
3 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * security/certificate_types_descriptions/etcd-certificates.adoc | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="etcd-cert-alerts-metrics-signer_{context}"] | ||
= etcd certificate rotation alerts and metrics signer certificates | ||
|
||
Two alert types inform users about pending `etcd` certificate expiration: | ||
[horizontal] | ||
`etcdSignerCAExpirationWarning`:: Occurs 730 days until the signer expires. | ||
`etcdSignerCAExpirationCritical`:: Occurs 365 days until the signer expires. | ||
|
||
You can rotate the certificate for the following reasons: | ||
|
||
* You receive an expiration alert. | ||
* The private key is leaked. | ||
[IMPORTANT] | ||
==== | ||
When a private key is leaked, you must rotate all of the certificates. | ||
==== | ||
|
||
There is an `etcd` signer for the {product-title} metrics system. Substitute the following metrics parameters in _Rotating the etcd certificate_. | ||
|
||
* `etcd-metric-signer` instead of `etcd-signer` | ||
* `etcd-metrics-ca-bundle` instead of `etcd-ca-bundle` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// security/certificate_types_descriptions/etcd-certificates.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="rotating-certificate-authority_{context}"] | ||
= Rotating the etcd certificate | ||
|
||
Rotate the `etcd` certificate before it expires. | ||
|
||
.Procedure | ||
|
||
. Verify the remaining lifetime of the new signer certificate by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc get secret -n openshift-etcd etcd-signer -ojsonpath='{.metadata.annotations.auth\.openshift\.io/certificate-not-after}' | ||
---- | ||
|
||
. If the remaining lifetime is close to the current date, re-create the signer by deleting the signer and wait for the static pod roll out. | ||
* Delete the signer by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc delete secret -n openshift-etcd etcd-signer | ||
---- | ||
|
||
* Wait for the static pod roll out by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc wait --for=condition=Progressing=False --timeout=15m clusteroperator/etcd | ||
---- | ||
. After `etcd` restarts, switch the original CA in the `openshift-config` namespace with the new, rotated one in `openshift-etcd` by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc get secret etcd-signer -n openshift-etcd -ojson | jq 'del(.metadata["namespace","creationTimestamp","resourceVersion","selfLink","uid"])' | oc apply -n openshift-config -f - | ||
---- | ||
|
||
. Wait for the cluster Operators to roll out and stabilize by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc adm wait-for-stable-cluster --minimum-stable-period 2m | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters