Skip to content

Commit 5276ddb

Browse files
committed
added more details to AKS readme
1 parent 0cf0cf3 commit 5276ddb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

_examples/aks/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,18 @@ export KUBECONFIG=$(terraform output -raw kubeconfig_path)
3232
kubectl get pods -n test
3333
```
3434

35-
However, in a real-world scenario, this config file would have to be replaced periodically as the AKS client certificates eventually expire (see the [Azure documentation](https://docs.microsoft.com/en-us/azure/aks/certificate-rotation) for the exact expiry dates). If the certificates (or other authentication attributes) are replaced, run `terraform apply` to pull in the new credentials.
35+
However, in a real-world scenario, this config file would have to be replaced periodically as the AKS client certificates eventually expire (see the [Azure documentation](https://docs.microsoft.com/en-us/azure/aks/certificate-rotation) for the exact expiry dates). If the certificates (or other authentication attributes) are replaced, run a targeted `terraform apply` to save the new credentials into state.
3636

3737
```
38+
terraform plan -target=module.aks-cluster
39+
terraform apply -target=module.aks-cluster
40+
```
41+
42+
Once the targeted apply is finished, the Kubernetes and Helm providers will be available for use again. Run `terraform apply` again (without targeting) to apply any updates to Kubernetes resources.
43+
44+
```
45+
terraform plan
3846
terraform apply
39-
export KUBECONFIG=$(terraform output -raw kubeconfig_path)
40-
kubectl get pods -n test
4147
```
4248

4349
This approach prevents the Kubernetes and Helm providers from attempting to use cached, invalid credentials, which would cause provider configuration errors durring the plan and apply phases.

0 commit comments

Comments
 (0)