Skip to content

Commit 33f2c34

Browse files
Merge pull request #193295 from miwithro/patch-132
Update certificate-rotation.md
2 parents d156ec1 + e4f9159 commit 33f2c34

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

articles/aks/certificate-rotation.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
---
2-
title: Rotate certificates in Azure Kubernetes Service (AKS)
3-
description: Learn how to rotate your certificates in an Azure Kubernetes Service (AKS) cluster.
2+
title: Certificate Rotation in Azure Kubernetes Service (AKS)
3+
description: Learn certificate rotation in an Azure Kubernetes Service (AKS) cluster.
44
services: container-service
55
ms.topic: article
6-
ms.date: 3/4/2022
6+
ms.date: 3/29/2022
77
---
88

9-
# Rotate certificates in Azure Kubernetes Service (AKS)
9+
# Certificate rotation in Azure Kubernetes Service (AKS)
1010

11-
Azure Kubernetes Service (AKS) uses certificates for authentication with many of its components. Periodically, you may need to rotate those certificates for security or policy reasons. For example, you may have a policy to rotate all your certificates every 90 days.
11+
Azure Kubernetes Service (AKS) uses certificates for authentication with many of its components. If you have a RBAC-enabled cluster built after March 2022 it is enabled with certificate auto-rotation. Periodically, you may need to rotate those certificates for security or policy reasons. For example, you may have a policy to rotate all your certificates every 90 days.
1212

13-
This article shows you how to rotate the certificates in your AKS cluster.
13+
> [!NOTE]
14+
> Certificate auto-rotation will not be enabled by default for non-RBAC enabled AKS clusters.
15+
16+
This article shows you how certificate rotation works in your AKS cluster.
1417

1518
## Before you begin
1619

@@ -28,7 +31,7 @@ AKS generates and uses the following certificates, Certificate Authorities, and
2831
* The `kubectl` client has a certificate for communicating with the AKS cluster.
2932

3033
> [!NOTE]
31-
> AKS clusters created prior to May 2019 have certificates that expire after two years. Any cluster created after May 2019 or any cluster that has its certificates rotated have Cluster CA certificates that expire after 30 years. All other AKS certificates, which use the Cluster CA to for signing, will expire after two years and are automatically rotated during AKS version upgrade happened after 8/1/2021. To verify when your cluster was created, use `kubectl get nodes` to see the *Age* of your node pools.
34+
> AKS clusters created prior to May 2019 have certificates that expire after two years. Any cluster created after May 2019 or any cluster that has its certificates rotated have Cluster CA certificates that expire after 30 years. All other AKS certificates, which use the Cluster CA for signing, will expire after two years and are automatically rotated during an AKS version upgrade which happened after 8/1/2021. To verify when your cluster was created, use `kubectl get nodes` to see the *Age* of your node pools.
3235
>
3336
> Additionally, you can check the expiration date of your cluster's certificate. For example, the following bash command displays the client certificate details for the *myAKSCluster* cluster in resource group *rg*
3437
> ```console
@@ -45,17 +48,20 @@ curl https://{apiserver-fqdn} -k -v 2>&1 |grep expire
4548
az vm run-command invoke -g MC_rg_myAKSCluster_region -n vm-name --command-id RunShellScript --query 'value[0].message' -otsv --scripts "openssl x509 -in /etc/kubernetes/certs/apiserver.crt -noout -enddate"
4649
```
4750

48-
* Check expiration date of certificate on one VMSS agent node
51+
* Check expiration date of certificate on one virtual machine scale set agent node
4952
```azurecli
5053
az vmss run-command invoke -g MC_rg_myAKSCluster_region -n vmss-name --instance-id 0 --command-id RunShellScript --query 'value[0].message' -otsv --scripts "openssl x509 -in /etc/kubernetes/certs/apiserver.crt -noout -enddate"
5154
```
5255

5356
## Certificate Auto Rotation
5457

55-
Azure Kubernetes Service will automatically rotate non-ca certificates on both the control plane and agent nodes before they expire with no downtime for the cluster.
56-
5758
For AKS to automatically rotate non-CA certificates, the cluster must have [TLS Bootstrapping](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/) which has been enabled by default in all Azure regions.
5859

60+
> [!Note]
61+
> If you have an existing cluster you have to upgrade that cluster to enable Certificate Auto-Rotation.
62+
63+
For any AKS clusters created or upgraded after March 2022 Azure Kubernetes Service will automatically rotate non-ca certificates on both the control plane and agent nodes within 80% of the client certificate valid time, before they expire with no downtime for the cluster.
64+
5965
#### How to check whether current agent node pool is TLS Bootstrapping enabled?
6066
To verify if TLS Bootstrapping is enabled on your cluster browse to the following paths. On a Linux node: /var/lib/kubelet/bootstrap-kubeconfig, on a Windows node, it’s c:\k\bootstrap-config.
6167

@@ -69,8 +75,7 @@ To verify if TLS Bootstrapping is enabled on your cluster browse to the followin
6975

7076
Auto cert rotation won't be enabled on non-rbac cluster.
7177

72-
73-
## Rotate your cluster certificates
78+
## Manually rotate your cluster certificates
7479

7580
> [!WARNING]
7681
> Rotating your certificates using `az aks rotate-certs` will recreate all of your nodes and their OS Disks and can cause up to 30 minutes of downtime for your AKS cluster.

articles/aks/managed-aad.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ When deploying an AKS Cluster, local accounts are enabled by default. Even when
190190
> On clusters with Azure AD integration enabled, users belonging to a group specified by `aad-admin-group-object-ids` will still be able to gain access via non-admin credentials. On clusters without Azure AD integration enabled and `properties.disableLocalAccounts` set to true, obtaining both user and admin credentials will fail.
191191
192192
> [!NOTE]
193-
> After disabling local accounts users on an already existing AKS cluster where users might have used local account/s, admin must [rotate the cluster certificates](certificate-rotation.md#rotate-your-cluster-certificates), in order to revoke the certificates those users might have access to. If this is a new cluster than no action is required.
193+
> After disabling local accounts users on an already existing AKS cluster where users might have used local account/s, admin must [rotate the cluster certificates](certificate-rotation.md), in order to revoke the certificates those users might have access to. If this is a new cluster then no action is required.
194194
195195
### Create a new cluster without local accounts
196196

0 commit comments

Comments
 (0)