Skip to content

Commit 2d87d78

Browse files
committed
updated steps and links"
1 parent b56ddae commit 2d87d78

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

articles/aks/certificate-rotation.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ Certificates mentioned above are maintained by Microsoft, except the cluster cer
4040
> kubectl config view --raw -o jsonpath="{.users[?(@.name == 'clusterUser_rg_myAKSCluster')].user.client-certificate-data}" | base64 -d | openssl x509 -text | grep -A2 Validity
4141
> ```
4242
43-
* Check expiration date of apiserver certificate
43+
* To check expiration date of apiserver certificate, run the following command:
4444
4545
```console
4646
curl https://{apiserver-fqdn} -k -v 2>&1 |grep expire
4747
```
4848
49-
* Check expiration date of certificate on VMAS agent node
49+
* To check the expiration date of certificate on VMAS agent node, run the following command:
5050

5151
```azurecli
5252
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"
5353
```
5454

55-
* Check expiration date of certificate on one virtual machine scale set agent node
55+
* To check expiration date of certificate on one virtual machine scale set agent node, run the following command:
5656

5757
```azurecli
5858
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"
@@ -110,34 +110,35 @@ az aks rotate-certs -g $RESOURCE_GROUP_NAME -n $CLUSTER_NAME
110110
> [!IMPORTANT]
111111
> It may take up to 30 minutes for `az aks rotate-certs` to complete. If the command fails before completing, use `az aks show` to verify the status of the cluster is *Certificate Rotating*. If the cluster is in a failed state, rerun `az aks rotate-certs` to rotate your certificates again.
112112
113-
Verify that the old certificates are no longer valid by running a `kubectl` command. Since you have not updated the certificates used by `kubectl`, you will see an error. For example:
113+
Verify that the old certificates aren't valid by running any `kubectl` command. If you haven't updated the certificates used by `kubectl`, you'll see an error similar to the following example:
114114

115115
```console
116-
$ kubectl get nodes
116+
kubectl get nodes
117117
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "ca")
118118
```
119119

120-
Update the certificate used by `kubectl` by running `az aks get-credentials`.
120+
To update the certificate used by `kubectl`, run the [az aks get-credentials][az-aks-get-credentials] command:
121121

122122
```azurecli
123123
az aks get-credentials -g $RESOURCE_GROUP_NAME -n $CLUSTER_NAME --overwrite-existing
124124
```
125125

126-
Verify the certificates have been updated by running a `kubectl` command, which will now succeed. For example:
126+
To verify the certificates have been updated, run the following [kubectl get][kubectl-get] command:
127127

128128
```console
129129
kubectl get nodes
130130
```
131131

132132
> [!NOTE]
133-
> If you have any services that run on top of AKS, you may need to update certificates related to those services as well.
133+
> If you have any services that run on top of AKS, you might need to update their certificates.
134134
135135
## Next steps
136136

137137
This article showed you how to automatically rotate your cluster's certificates, CAs, and SAs. You can see [Best practices for cluster security and upgrades in Azure Kubernetes Service (AKS)][aks-best-practices-security-upgrades] for more information on AKS security best practices.
138138

139139
[azure-cli-install]: /cli/azure/install-azure-cli
140140
[az-aks-get-credentials]: /cli/azure/aks#az_aks_get_credentials
141+
[az-get]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get
141142
[az-extension-add]: /cli/azure/extension#az_extension_add
142143
[az-extension-update]: /cli/azure/extension#az_extension_update
143144
[aks-best-practices-security-upgrades]: operator-best-practices-cluster-security.md

0 commit comments

Comments
 (0)