diff --git a/linkerd.io/content/2-edge/tasks/automatically-rotating-control-plane-tls-credentials.md b/linkerd.io/content/2-edge/tasks/automatically-rotating-control-plane-tls-credentials.md index 99f8dafbb9..2e356b0df8 100644 --- a/linkerd.io/content/2-edge/tasks/automatically-rotating-control-plane-tls-credentials.md +++ b/linkerd.io/content/2-edge/tasks/automatically-rotating-control-plane-tls-credentials.md @@ -148,46 +148,6 @@ helm install \ --wait ``` -Finally, we'll need to update cert-manager's RBAC permissions. By default -cert-manager will only create certificate secrets in the namespace where it is -installed. Linkerd, however, requires its identity issuer to be created in the -`linkerd` namespace. To allow this, we create a `ServiceAccount` for -cert-manager in the `linkerd` namespace with the required permissions. - -```bash -kubectl apply -f - <}} @@ -842,15 +818,13 @@ kubectl get secret -n cert-manager linkerd-previous-anchor \ | base64 -d | inspect_cert ``` -Additionally, the `linkerd-identity-trust-roots` ConfigMap should now contain -the Subject keys from both Secrets. (We can't use `inspect_cert` for this since -there are two keys.) +Verify that the `linkerd-identity-trust-roots` ConfigMap now contains +the Subject keys from both Secrets. ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --bundle --format json \ - | jq -r ".[] | \"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` Note that mTLS communication is still working fine at this point. All the @@ -858,7 +832,25 @@ proxies in the data plane are still using the old identity issuer, signed by the old trust anchor, and that trust anchor is still present in `linkerd-identity-trust-roots`. -#### 2. Triggering identity issuer rotation +#### 2. Restart the control plane + +Restart the control plane with `kubectl rollout restart`: + +```bash +kubectl rollout restart -n linkerd deploy +kubectl rollout status -n linkerd deploy +``` + +This will cause the control plane to pick up the new trust anchor bundle. + +#### 3. Restart the data plane + +At this point, you'll need to restart your workloads as well, to force the +proxies to have the new trust anchor bundle. The exact mechanism to do this +will depend on your workloads, but it's often just `kubectl rollout restart` for +each of your application namespaces. + +#### 4. Triggering identity issuer rotation Everything is still using the old identity issuer because, strangely, manually triggering cert-manager to rotate the trust anchor does not automatically rotate @@ -887,9 +879,9 @@ kubectl get secret -n linkerd linkerd-identity-issuer \ | base64 -d | inspect_cert ``` -#### 3. Restart the control plane +#### 5. Restart the control plane -Restart the control plane with `kubectl rollout restart`: +Restart the control plane again with `kubectl rollout restart`: ```bash kubectl rollout restart -n linkerd deploy @@ -899,14 +891,14 @@ kubectl rollout status -n linkerd deploy This will cause the control plane to pick up the new trust anchor and identity issuer. -#### 4. Restart the data plane +#### 6. Restart the data plane -At this point, you'll need to restart your workloads as well, to force the -proxies to switch to the new identity issuer. The exact mechanism to do this -when depend on your workloads, but it's often just `kubectl rollout restart` for -each of your application namespaces. +Again, you'll need to restart your workloads, to force the +proxies to switch to the new identity issuer signed by the new trust anchor. +The exact mechanism to do this will depend on your workloads, but it's often +just `kubectl rollout restart` for each of your application namespaces. -#### 5. Remove the old anchor from the trust bundle +#### 7. Remove the old anchor from the trust bundle One last step: once everything is restarted, you'll need to remove the old trust anchor from the trust bundle. To do this, just copy the `linkerd-trust-anchor` @@ -933,14 +925,15 @@ You can doublecheck this with `kubectl` again: ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --format json \ - | jq -r "\"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` and you should only see the single ID of the current trust anchor. At this point rotation is complete: everything is using the new trust anchor, -and the old trust anchor is no longer trusted. +and the old trust anchor is no longer trusted. You will need to restart your +workloads one more time so that they are aware of only the one trust anchor +that's still in use. ## See also diff --git a/linkerd.io/content/2.14/tasks/automatically-rotating-control-plane-tls-credentials.md b/linkerd.io/content/2.14/tasks/automatically-rotating-control-plane-tls-credentials.md index 99f8dafbb9..2e356b0df8 100644 --- a/linkerd.io/content/2.14/tasks/automatically-rotating-control-plane-tls-credentials.md +++ b/linkerd.io/content/2.14/tasks/automatically-rotating-control-plane-tls-credentials.md @@ -148,46 +148,6 @@ helm install \ --wait ``` -Finally, we'll need to update cert-manager's RBAC permissions. By default -cert-manager will only create certificate secrets in the namespace where it is -installed. Linkerd, however, requires its identity issuer to be created in the -`linkerd` namespace. To allow this, we create a `ServiceAccount` for -cert-manager in the `linkerd` namespace with the required permissions. - -```bash -kubectl apply -f - <}} @@ -842,15 +818,13 @@ kubectl get secret -n cert-manager linkerd-previous-anchor \ | base64 -d | inspect_cert ``` -Additionally, the `linkerd-identity-trust-roots` ConfigMap should now contain -the Subject keys from both Secrets. (We can't use `inspect_cert` for this since -there are two keys.) +Verify that the `linkerd-identity-trust-roots` ConfigMap now contains +the Subject keys from both Secrets. ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --bundle --format json \ - | jq -r ".[] | \"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` Note that mTLS communication is still working fine at this point. All the @@ -858,7 +832,25 @@ proxies in the data plane are still using the old identity issuer, signed by the old trust anchor, and that trust anchor is still present in `linkerd-identity-trust-roots`. -#### 2. Triggering identity issuer rotation +#### 2. Restart the control plane + +Restart the control plane with `kubectl rollout restart`: + +```bash +kubectl rollout restart -n linkerd deploy +kubectl rollout status -n linkerd deploy +``` + +This will cause the control plane to pick up the new trust anchor bundle. + +#### 3. Restart the data plane + +At this point, you'll need to restart your workloads as well, to force the +proxies to have the new trust anchor bundle. The exact mechanism to do this +will depend on your workloads, but it's often just `kubectl rollout restart` for +each of your application namespaces. + +#### 4. Triggering identity issuer rotation Everything is still using the old identity issuer because, strangely, manually triggering cert-manager to rotate the trust anchor does not automatically rotate @@ -887,9 +879,9 @@ kubectl get secret -n linkerd linkerd-identity-issuer \ | base64 -d | inspect_cert ``` -#### 3. Restart the control plane +#### 5. Restart the control plane -Restart the control plane with `kubectl rollout restart`: +Restart the control plane again with `kubectl rollout restart`: ```bash kubectl rollout restart -n linkerd deploy @@ -899,14 +891,14 @@ kubectl rollout status -n linkerd deploy This will cause the control plane to pick up the new trust anchor and identity issuer. -#### 4. Restart the data plane +#### 6. Restart the data plane -At this point, you'll need to restart your workloads as well, to force the -proxies to switch to the new identity issuer. The exact mechanism to do this -when depend on your workloads, but it's often just `kubectl rollout restart` for -each of your application namespaces. +Again, you'll need to restart your workloads, to force the +proxies to switch to the new identity issuer signed by the new trust anchor. +The exact mechanism to do this will depend on your workloads, but it's often +just `kubectl rollout restart` for each of your application namespaces. -#### 5. Remove the old anchor from the trust bundle +#### 7. Remove the old anchor from the trust bundle One last step: once everything is restarted, you'll need to remove the old trust anchor from the trust bundle. To do this, just copy the `linkerd-trust-anchor` @@ -933,14 +925,15 @@ You can doublecheck this with `kubectl` again: ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --format json \ - | jq -r "\"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` and you should only see the single ID of the current trust anchor. At this point rotation is complete: everything is using the new trust anchor, -and the old trust anchor is no longer trusted. +and the old trust anchor is no longer trusted. You will need to restart your +workloads one more time so that they are aware of only the one trust anchor +that's still in use. ## See also diff --git a/linkerd.io/content/2.15/tasks/automatically-rotating-control-plane-tls-credentials.md b/linkerd.io/content/2.15/tasks/automatically-rotating-control-plane-tls-credentials.md index 99f8dafbb9..2e356b0df8 100644 --- a/linkerd.io/content/2.15/tasks/automatically-rotating-control-plane-tls-credentials.md +++ b/linkerd.io/content/2.15/tasks/automatically-rotating-control-plane-tls-credentials.md @@ -148,46 +148,6 @@ helm install \ --wait ``` -Finally, we'll need to update cert-manager's RBAC permissions. By default -cert-manager will only create certificate secrets in the namespace where it is -installed. Linkerd, however, requires its identity issuer to be created in the -`linkerd` namespace. To allow this, we create a `ServiceAccount` for -cert-manager in the `linkerd` namespace with the required permissions. - -```bash -kubectl apply -f - <}} @@ -842,15 +818,13 @@ kubectl get secret -n cert-manager linkerd-previous-anchor \ | base64 -d | inspect_cert ``` -Additionally, the `linkerd-identity-trust-roots` ConfigMap should now contain -the Subject keys from both Secrets. (We can't use `inspect_cert` for this since -there are two keys.) +Verify that the `linkerd-identity-trust-roots` ConfigMap now contains +the Subject keys from both Secrets. ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --bundle --format json \ - | jq -r ".[] | \"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` Note that mTLS communication is still working fine at this point. All the @@ -858,7 +832,25 @@ proxies in the data plane are still using the old identity issuer, signed by the old trust anchor, and that trust anchor is still present in `linkerd-identity-trust-roots`. -#### 2. Triggering identity issuer rotation +#### 2. Restart the control plane + +Restart the control plane with `kubectl rollout restart`: + +```bash +kubectl rollout restart -n linkerd deploy +kubectl rollout status -n linkerd deploy +``` + +This will cause the control plane to pick up the new trust anchor bundle. + +#### 3. Restart the data plane + +At this point, you'll need to restart your workloads as well, to force the +proxies to have the new trust anchor bundle. The exact mechanism to do this +will depend on your workloads, but it's often just `kubectl rollout restart` for +each of your application namespaces. + +#### 4. Triggering identity issuer rotation Everything is still using the old identity issuer because, strangely, manually triggering cert-manager to rotate the trust anchor does not automatically rotate @@ -887,9 +879,9 @@ kubectl get secret -n linkerd linkerd-identity-issuer \ | base64 -d | inspect_cert ``` -#### 3. Restart the control plane +#### 5. Restart the control plane -Restart the control plane with `kubectl rollout restart`: +Restart the control plane again with `kubectl rollout restart`: ```bash kubectl rollout restart -n linkerd deploy @@ -899,14 +891,14 @@ kubectl rollout status -n linkerd deploy This will cause the control plane to pick up the new trust anchor and identity issuer. -#### 4. Restart the data plane +#### 6. Restart the data plane -At this point, you'll need to restart your workloads as well, to force the -proxies to switch to the new identity issuer. The exact mechanism to do this -when depend on your workloads, but it's often just `kubectl rollout restart` for -each of your application namespaces. +Again, you'll need to restart your workloads, to force the +proxies to switch to the new identity issuer signed by the new trust anchor. +The exact mechanism to do this will depend on your workloads, but it's often +just `kubectl rollout restart` for each of your application namespaces. -#### 5. Remove the old anchor from the trust bundle +#### 7. Remove the old anchor from the trust bundle One last step: once everything is restarted, you'll need to remove the old trust anchor from the trust bundle. To do this, just copy the `linkerd-trust-anchor` @@ -933,14 +925,15 @@ You can doublecheck this with `kubectl` again: ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --format json \ - | jq -r "\"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` and you should only see the single ID of the current trust anchor. At this point rotation is complete: everything is using the new trust anchor, -and the old trust anchor is no longer trusted. +and the old trust anchor is no longer trusted. You will need to restart your +workloads one more time so that they are aware of only the one trust anchor +that's still in use. ## See also diff --git a/linkerd.io/content/2.16/tasks/automatically-rotating-control-plane-tls-credentials.md b/linkerd.io/content/2.16/tasks/automatically-rotating-control-plane-tls-credentials.md index 99f8dafbb9..2e356b0df8 100644 --- a/linkerd.io/content/2.16/tasks/automatically-rotating-control-plane-tls-credentials.md +++ b/linkerd.io/content/2.16/tasks/automatically-rotating-control-plane-tls-credentials.md @@ -148,46 +148,6 @@ helm install \ --wait ``` -Finally, we'll need to update cert-manager's RBAC permissions. By default -cert-manager will only create certificate secrets in the namespace where it is -installed. Linkerd, however, requires its identity issuer to be created in the -`linkerd` namespace. To allow this, we create a `ServiceAccount` for -cert-manager in the `linkerd` namespace with the required permissions. - -```bash -kubectl apply -f - <}} @@ -842,15 +818,13 @@ kubectl get secret -n cert-manager linkerd-previous-anchor \ | base64 -d | inspect_cert ``` -Additionally, the `linkerd-identity-trust-roots` ConfigMap should now contain -the Subject keys from both Secrets. (We can't use `inspect_cert` for this since -there are two keys.) +Verify that the `linkerd-identity-trust-roots` ConfigMap now contains +the Subject keys from both Secrets. ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --bundle --format json \ - | jq -r ".[] | \"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` Note that mTLS communication is still working fine at this point. All the @@ -858,7 +832,25 @@ proxies in the data plane are still using the old identity issuer, signed by the old trust anchor, and that trust anchor is still present in `linkerd-identity-trust-roots`. -#### 2. Triggering identity issuer rotation +#### 2. Restart the control plane + +Restart the control plane with `kubectl rollout restart`: + +```bash +kubectl rollout restart -n linkerd deploy +kubectl rollout status -n linkerd deploy +``` + +This will cause the control plane to pick up the new trust anchor bundle. + +#### 3. Restart the data plane + +At this point, you'll need to restart your workloads as well, to force the +proxies to have the new trust anchor bundle. The exact mechanism to do this +will depend on your workloads, but it's often just `kubectl rollout restart` for +each of your application namespaces. + +#### 4. Triggering identity issuer rotation Everything is still using the old identity issuer because, strangely, manually triggering cert-manager to rotate the trust anchor does not automatically rotate @@ -887,9 +879,9 @@ kubectl get secret -n linkerd linkerd-identity-issuer \ | base64 -d | inspect_cert ``` -#### 3. Restart the control plane +#### 5. Restart the control plane -Restart the control plane with `kubectl rollout restart`: +Restart the control plane again with `kubectl rollout restart`: ```bash kubectl rollout restart -n linkerd deploy @@ -899,14 +891,14 @@ kubectl rollout status -n linkerd deploy This will cause the control plane to pick up the new trust anchor and identity issuer. -#### 4. Restart the data plane +#### 6. Restart the data plane -At this point, you'll need to restart your workloads as well, to force the -proxies to switch to the new identity issuer. The exact mechanism to do this -when depend on your workloads, but it's often just `kubectl rollout restart` for -each of your application namespaces. +Again, you'll need to restart your workloads, to force the +proxies to switch to the new identity issuer signed by the new trust anchor. +The exact mechanism to do this will depend on your workloads, but it's often +just `kubectl rollout restart` for each of your application namespaces. -#### 5. Remove the old anchor from the trust bundle +#### 7. Remove the old anchor from the trust bundle One last step: once everything is restarted, you'll need to remove the old trust anchor from the trust bundle. To do this, just copy the `linkerd-trust-anchor` @@ -933,14 +925,15 @@ You can doublecheck this with `kubectl` again: ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --format json \ - | jq -r "\"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` and you should only see the single ID of the current trust anchor. At this point rotation is complete: everything is using the new trust anchor, -and the old trust anchor is no longer trusted. +and the old trust anchor is no longer trusted. You will need to restart your +workloads one more time so that they are aware of only the one trust anchor +that's still in use. ## See also diff --git a/linkerd.io/content/2.17/tasks/automatically-rotating-control-plane-tls-credentials.md b/linkerd.io/content/2.17/tasks/automatically-rotating-control-plane-tls-credentials.md index 99f8dafbb9..2e356b0df8 100644 --- a/linkerd.io/content/2.17/tasks/automatically-rotating-control-plane-tls-credentials.md +++ b/linkerd.io/content/2.17/tasks/automatically-rotating-control-plane-tls-credentials.md @@ -148,46 +148,6 @@ helm install \ --wait ``` -Finally, we'll need to update cert-manager's RBAC permissions. By default -cert-manager will only create certificate secrets in the namespace where it is -installed. Linkerd, however, requires its identity issuer to be created in the -`linkerd` namespace. To allow this, we create a `ServiceAccount` for -cert-manager in the `linkerd` namespace with the required permissions. - -```bash -kubectl apply -f - <}} @@ -842,15 +818,13 @@ kubectl get secret -n cert-manager linkerd-previous-anchor \ | base64 -d | inspect_cert ``` -Additionally, the `linkerd-identity-trust-roots` ConfigMap should now contain -the Subject keys from both Secrets. (We can't use `inspect_cert` for this since -there are two keys.) +Verify that the `linkerd-identity-trust-roots` ConfigMap now contains +the Subject keys from both Secrets. ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --bundle --format json \ - | jq -r ".[] | \"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` Note that mTLS communication is still working fine at this point. All the @@ -858,7 +832,25 @@ proxies in the data plane are still using the old identity issuer, signed by the old trust anchor, and that trust anchor is still present in `linkerd-identity-trust-roots`. -#### 2. Triggering identity issuer rotation +#### 2. Restart the control plane + +Restart the control plane with `kubectl rollout restart`: + +```bash +kubectl rollout restart -n linkerd deploy +kubectl rollout status -n linkerd deploy +``` + +This will cause the control plane to pick up the new trust anchor bundle. + +#### 3. Restart the data plane + +At this point, you'll need to restart your workloads as well, to force the +proxies to have the new trust anchor bundle. The exact mechanism to do this +will depend on your workloads, but it's often just `kubectl rollout restart` for +each of your application namespaces. + +#### 4. Triggering identity issuer rotation Everything is still using the old identity issuer because, strangely, manually triggering cert-manager to rotate the trust anchor does not automatically rotate @@ -887,9 +879,9 @@ kubectl get secret -n linkerd linkerd-identity-issuer \ | base64 -d | inspect_cert ``` -#### 3. Restart the control plane +#### 5. Restart the control plane -Restart the control plane with `kubectl rollout restart`: +Restart the control plane again with `kubectl rollout restart`: ```bash kubectl rollout restart -n linkerd deploy @@ -899,14 +891,14 @@ kubectl rollout status -n linkerd deploy This will cause the control plane to pick up the new trust anchor and identity issuer. -#### 4. Restart the data plane +#### 6. Restart the data plane -At this point, you'll need to restart your workloads as well, to force the -proxies to switch to the new identity issuer. The exact mechanism to do this -when depend on your workloads, but it's often just `kubectl rollout restart` for -each of your application namespaces. +Again, you'll need to restart your workloads, to force the +proxies to switch to the new identity issuer signed by the new trust anchor. +The exact mechanism to do this will depend on your workloads, but it's often +just `kubectl rollout restart` for each of your application namespaces. -#### 5. Remove the old anchor from the trust bundle +#### 7. Remove the old anchor from the trust bundle One last step: once everything is restarted, you'll need to remove the old trust anchor from the trust bundle. To do this, just copy the `linkerd-trust-anchor` @@ -933,14 +925,15 @@ You can doublecheck this with `kubectl` again: ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --format json \ - | jq -r "\"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` and you should only see the single ID of the current trust anchor. At this point rotation is complete: everything is using the new trust anchor, -and the old trust anchor is no longer trusted. +and the old trust anchor is no longer trusted. You will need to restart your +workloads one more time so that they are aware of only the one trust anchor +that's still in use. ## See also diff --git a/linkerd.io/content/2.18/tasks/automatically-rotating-control-plane-tls-credentials.md b/linkerd.io/content/2.18/tasks/automatically-rotating-control-plane-tls-credentials.md index 99f8dafbb9..2e356b0df8 100644 --- a/linkerd.io/content/2.18/tasks/automatically-rotating-control-plane-tls-credentials.md +++ b/linkerd.io/content/2.18/tasks/automatically-rotating-control-plane-tls-credentials.md @@ -148,46 +148,6 @@ helm install \ --wait ``` -Finally, we'll need to update cert-manager's RBAC permissions. By default -cert-manager will only create certificate secrets in the namespace where it is -installed. Linkerd, however, requires its identity issuer to be created in the -`linkerd` namespace. To allow this, we create a `ServiceAccount` for -cert-manager in the `linkerd` namespace with the required permissions. - -```bash -kubectl apply -f - <}} @@ -842,15 +818,13 @@ kubectl get secret -n cert-manager linkerd-previous-anchor \ | base64 -d | inspect_cert ``` -Additionally, the `linkerd-identity-trust-roots` ConfigMap should now contain -the Subject keys from both Secrets. (We can't use `inspect_cert` for this since -there are two keys.) +Verify that the `linkerd-identity-trust-roots` ConfigMap now contains +the Subject keys from both Secrets. ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --bundle --format json \ - | jq -r ".[] | \"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` Note that mTLS communication is still working fine at this point. All the @@ -858,7 +832,25 @@ proxies in the data plane are still using the old identity issuer, signed by the old trust anchor, and that trust anchor is still present in `linkerd-identity-trust-roots`. -#### 2. Triggering identity issuer rotation +#### 2. Restart the control plane + +Restart the control plane with `kubectl rollout restart`: + +```bash +kubectl rollout restart -n linkerd deploy +kubectl rollout status -n linkerd deploy +``` + +This will cause the control plane to pick up the new trust anchor bundle. + +#### 3. Restart the data plane + +At this point, you'll need to restart your workloads as well, to force the +proxies to have the new trust anchor bundle. The exact mechanism to do this +will depend on your workloads, but it's often just `kubectl rollout restart` for +each of your application namespaces. + +#### 4. Triggering identity issuer rotation Everything is still using the old identity issuer because, strangely, manually triggering cert-manager to rotate the trust anchor does not automatically rotate @@ -887,9 +879,9 @@ kubectl get secret -n linkerd linkerd-identity-issuer \ | base64 -d | inspect_cert ``` -#### 3. Restart the control plane +#### 5. Restart the control plane -Restart the control plane with `kubectl rollout restart`: +Restart the control plane again with `kubectl rollout restart`: ```bash kubectl rollout restart -n linkerd deploy @@ -899,14 +891,14 @@ kubectl rollout status -n linkerd deploy This will cause the control plane to pick up the new trust anchor and identity issuer. -#### 4. Restart the data plane +#### 6. Restart the data plane -At this point, you'll need to restart your workloads as well, to force the -proxies to switch to the new identity issuer. The exact mechanism to do this -when depend on your workloads, but it's often just `kubectl rollout restart` for -each of your application namespaces. +Again, you'll need to restart your workloads, to force the +proxies to switch to the new identity issuer signed by the new trust anchor. +The exact mechanism to do this will depend on your workloads, but it's often +just `kubectl rollout restart` for each of your application namespaces. -#### 5. Remove the old anchor from the trust bundle +#### 7. Remove the old anchor from the trust bundle One last step: once everything is restarted, you'll need to remove the old trust anchor from the trust bundle. To do this, just copy the `linkerd-trust-anchor` @@ -933,14 +925,15 @@ You can doublecheck this with `kubectl` again: ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --format json \ - | jq -r "\"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` and you should only see the single ID of the current trust anchor. At this point rotation is complete: everything is using the new trust anchor, -and the old trust anchor is no longer trusted. +and the old trust anchor is no longer trusted. You will need to restart your +workloads one more time so that they are aware of only the one trust anchor +that's still in use. ## See also diff --git a/linkerd.io/content/2.19/tasks/automatically-rotating-control-plane-tls-credentials.md b/linkerd.io/content/2.19/tasks/automatically-rotating-control-plane-tls-credentials.md index 99f8dafbb9..2e356b0df8 100644 --- a/linkerd.io/content/2.19/tasks/automatically-rotating-control-plane-tls-credentials.md +++ b/linkerd.io/content/2.19/tasks/automatically-rotating-control-plane-tls-credentials.md @@ -148,46 +148,6 @@ helm install \ --wait ``` -Finally, we'll need to update cert-manager's RBAC permissions. By default -cert-manager will only create certificate secrets in the namespace where it is -installed. Linkerd, however, requires its identity issuer to be created in the -`linkerd` namespace. To allow this, we create a `ServiceAccount` for -cert-manager in the `linkerd` namespace with the required permissions. - -```bash -kubectl apply -f - <}} @@ -842,15 +818,13 @@ kubectl get secret -n cert-manager linkerd-previous-anchor \ | base64 -d | inspect_cert ``` -Additionally, the `linkerd-identity-trust-roots` ConfigMap should now contain -the Subject keys from both Secrets. (We can't use `inspect_cert` for this since -there are two keys.) +Verify that the `linkerd-identity-trust-roots` ConfigMap now contains +the Subject keys from both Secrets. ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --bundle --format json \ - | jq -r ".[] | \"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` Note that mTLS communication is still working fine at this point. All the @@ -858,7 +832,25 @@ proxies in the data plane are still using the old identity issuer, signed by the old trust anchor, and that trust anchor is still present in `linkerd-identity-trust-roots`. -#### 2. Triggering identity issuer rotation +#### 2. Restart the control plane + +Restart the control plane with `kubectl rollout restart`: + +```bash +kubectl rollout restart -n linkerd deploy +kubectl rollout status -n linkerd deploy +``` + +This will cause the control plane to pick up the new trust anchor bundle. + +#### 3. Restart the data plane + +At this point, you'll need to restart your workloads as well, to force the +proxies to have the new trust anchor bundle. The exact mechanism to do this +will depend on your workloads, but it's often just `kubectl rollout restart` for +each of your application namespaces. + +#### 4. Triggering identity issuer rotation Everything is still using the old identity issuer because, strangely, manually triggering cert-manager to rotate the trust anchor does not automatically rotate @@ -887,9 +879,9 @@ kubectl get secret -n linkerd linkerd-identity-issuer \ | base64 -d | inspect_cert ``` -#### 3. Restart the control plane +#### 5. Restart the control plane -Restart the control plane with `kubectl rollout restart`: +Restart the control plane again with `kubectl rollout restart`: ```bash kubectl rollout restart -n linkerd deploy @@ -899,14 +891,14 @@ kubectl rollout status -n linkerd deploy This will cause the control plane to pick up the new trust anchor and identity issuer. -#### 4. Restart the data plane +#### 6. Restart the data plane -At this point, you'll need to restart your workloads as well, to force the -proxies to switch to the new identity issuer. The exact mechanism to do this -when depend on your workloads, but it's often just `kubectl rollout restart` for -each of your application namespaces. +Again, you'll need to restart your workloads, to force the +proxies to switch to the new identity issuer signed by the new trust anchor. +The exact mechanism to do this will depend on your workloads, but it's often +just `kubectl rollout restart` for each of your application namespaces. -#### 5. Remove the old anchor from the trust bundle +#### 7. Remove the old anchor from the trust bundle One last step: once everything is restarted, you'll need to remove the old trust anchor from the trust bundle. To do this, just copy the `linkerd-trust-anchor` @@ -933,14 +925,15 @@ You can doublecheck this with `kubectl` again: ```bash kubectl get configmap -n linkerd linkerd-identity-trust-roots \ -o jsonpath='{ .data.ca-bundle\.crt }' \ - | step certificate inspect --format json \ - | jq -r "\"Subject: \(.extensions.subject_key_id | .[0:16])... \(.subject_dn)\"" + | inspect_cert ``` and you should only see the single ID of the current trust anchor. At this point rotation is complete: everything is using the new trust anchor, -and the old trust anchor is no longer trusted. +and the old trust anchor is no longer trusted. You will need to restart your +workloads one more time so that they are aware of only the one trust anchor +that's still in use. ## See also