You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/configuration/acme/dns01/azuredns.md
+36-34Lines changed: 36 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ If you have an Azure AKS cluster you can use the following command:
29
29
az aks update \
30
30
--name ${CLUSTER} \
31
31
--enable-oidc-issuer \
32
-
--enable-workload-identity# ℹ️ This option is currently only available when using the aks-preview extension.
32
+
--enable-workload-identity
33
33
```
34
34
35
35
> ℹ️ You can [install the Azure workload identity extension on other managed and self-managed clusters](https://azure.github.io/azure-workload-identity/docs/installation.html) if you are not using Azure AKS.
@@ -38,18 +38,15 @@ az aks update \
38
38
>
39
39
### Reconfigure cert-manager
40
40
41
-
Label the cert-manager controller Pod and ServiceAccount for the attention of the Azure Workload Identity webhook,
41
+
Label the cert-manager controller Pod for the attention of the Azure Workload Identity webhook,
42
42
which will result in the cert-manager controller Pod having an extra volume containing a Kubernetes ServiceAccount token which it will use to authenticate with Azure.
43
43
44
-
If you installed cert-manager using Helm, the labels can be configured using Helm values:
44
+
If you installed cert-manager using Helm, the label can be configured using Helm values:
45
45
46
46
```yaml
47
47
# values.yaml
48
48
podLabels:
49
49
azure.workload.identity/use: "true"
50
-
serviceAccount:
51
-
labels:
52
-
azure.workload.identity/use: "true"
53
50
```
54
51
55
52
If successful, the cert-manager Pod will have some new environment variables set,
@@ -92,16 +89,17 @@ Choose a managed identity name and create the Managed Identity:
92
89
93
90
```bash
94
91
export IDENTITY_NAME=cert-manager
95
-
az identity create --name "${IDENTITY_NAME}"
92
+
export IDENTITY_RESOURCE_GROUP=<your-resource-group># ❗ Replace with your Azure resource group
93
+
az identity create --name "${IDENTITY_NAME}" --resource-group "${IDENTITY_RESOURCE_GROUP}"
96
94
```
97
95
98
96
Grant it permission to modify the DNS zone records:
99
97
100
98
```bash
101
-
export IDENTITY_CLIENT_ID=$(az identity show --name "${IDENTITY_NAME}" --query 'clientId' -o tsv)
# client ID of the managed identity; overrides AZURE_CLIENT_ID from the environment
162
162
clientID: $IDENTITY_CLIENT_ID
163
+
# # optional: tenant ID of the managed identity; overrides AZURE_TENANT_ID from the environment.
164
+
# tenantID: $IDENTITY_TENANT_ID
163
165
```
164
166
167
+
> ℹ️ `managedIdentity.clientID` and `managedIdentity.tenantID` override the values that the Azure Workload Identity webhook injects via environment variables (`AZURE_CLIENT_ID` and `AZURE_TENANT_ID`).
168
+
165
169
The following variables need to be filled in.
166
170
167
171
```bash
@@ -186,7 +190,7 @@ ClusterIssuer resources are cluster scoped (not namespaced) and only platform ad
186
190
If you are using this authentication mechanism and ambient credentials are not enabled, you will see this error:
187
191
188
192
```bash
189
-
error instantiating azuredns challenge solver: ClientID is not set but neither --cluster-issuer-ambient-credentials nor --issuer-ambient-credentialsare set.
193
+
error instantiating azuredns challenge solver: ClientID was omitted without providing one of `--cluster-issuer-ambient-credentials` or `--issuer-ambient-credentials`. These are necessary to enable Azure Managed Identities
190
194
```
191
195
192
196
> ⚠️ It is possible (but not recommended) to enable this authentication mechanism for `Issuer` resources, by setting the `--issuer-ambient-credentials` flag on the cert-manager controller to true.
@@ -322,12 +326,11 @@ spec:
322
326
This authentication mechanism is what cert-manager considers 'ambient credentials'. Use of ambient credentials is disabled by default for cert-manager `Issuer`s. This to ensure unprivileged users who have permission to create issuers cannot issue certificates using any credentials cert-manager incidentally has access to. To enable this authentication mechanism for `Issuer`s, you will need to set `--issuer-ambient-credentials` flag on cert-manager controller to true. (There is a corresponding `--cluster-issuer-ambient-credentials` flag which is set to `true` by default).
323
327
324
328
If you are using this authentication mechanism and ambient credentials are not enabled, you will see this error:
329
+
325
330
```bash
326
-
error instantiating azuredns challenge solver: ClientID is not set but neither --cluster-issuer-ambient-credentials nor --issuer-ambient-credentialsare set.
331
+
error instantiating azuredns challenge solver: ClientID was omitted without providing one of `--cluster-issuer-ambient-credentials` or `--issuer-ambient-credentials`. These are necessary to enable Azure Managed Identities
327
332
```
328
333
329
-
These are necessary to enable Azure Managed Identities.
330
-
331
334
## Managed Identity Using AKS Kubelet Identity
332
335
333
336
When creating an AKS cluster in Azure there is the option to use a managed identity that is assigned to the kubelet. This identity is assigned to the underlying node pool in the AKS cluster and can then be used by the cert-manager pods to authenticate to Azure Active Directory.
@@ -420,19 +423,18 @@ To create the service principal you can use the following script (requires
420
423
`azure-cli` and `jq`):
421
424
422
425
```bash
423
-
# Choose a name for the service principal that contacts azure DNS to present
AZURE_SUBSCRIPTION_ID=$(az account show --output json | jq -r '.id')
436
438
```
437
439
438
440
For security purposes, it is appropriate to utilize RBAC to ensure that you
@@ -444,37 +446,37 @@ so that it can read/write the \_acme\_challenge TXT records to the zone.
444
446
Lower the Permissions of the service principal.
445
447
446
448
```bash
447
-
$ az role assignment delete --assignee $AZURE_CERT_MANAGER_SP_APP_ID --role Contributor
449
+
az role assignment delete --assignee $AZURE_CERT_MANAGER_SP_APP_ID --role Contributor
448
450
```
449
451
450
452
Give Access to DNS Zone.
451
453
452
454
```bash
453
-
$ DNS_ID=$(az network dns zone show --name $AZURE_DNS_ZONE --resource-group $AZURE_DNS_ZONE_RESOURCE_GROUP --query "id" --output tsv)
454
-
$ az role assignment create --assignee $AZURE_CERT_MANAGER_SP_APP_ID --role "DNS Zone Contributor" --scope $DNS_ID
455
+
DNS_ID=$(az network dns zone show --name $AZURE_DNS_ZONE --resource-group $AZURE_DNS_ZONE_RESOURCE_GROUP --query "id" --output tsv)
456
+
az role assignment create --assignee $AZURE_CERT_MANAGER_SP_APP_ID --role "DNS Zone Contributor" --scope $DNS_ID
455
457
```
456
458
457
459
Check Permissions. As the result of the following command, we would like to see just one object in the permissions array with "DNS Zone Contributor" role.
458
460
459
461
```bash
460
-
$ az role assignment list --all --assignee $AZURE_CERT_MANAGER_SP_APP_ID
462
+
az role assignment list --all --assignee $AZURE_CERT_MANAGER_SP_APP_ID
461
463
```
462
464
463
465
A secret containing service principal password should be created on Kubernetes to facilitate presenting the challenge to Azure DNS. You can create the secret with the following command:
Copy file name to clipboardExpand all lines: content/docs/tutorials/getting-started-aks-letsencrypt/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: |
6
6
using the DNS-01 protocol and Azure DNS with workload identity federation.
7
7
---
8
8
9
-
*Last Verified: 11 January 2024*
9
+
*Last Verified: 28 February 2026*
10
10
11
11
In this tutorial you will learn how to deploy and configure cert-manager on Azure Kubernetes Service (AKS)
12
12
and how to deploy an HTTPS web server and make it available on the Internet.
@@ -358,10 +358,10 @@ az aks update \
358
358
359
359
## Reconfigure cert-manager
360
360
361
-
We will label the cert-manager controller Pod and ServiceAccount for the attention of the Azure Workload Identity webhook,
361
+
We will label the cert-manager controller Pod for the attention of the Azure Workload Identity webhook,
362
362
which will result in the cert-manager controller Pod having an extra volume containing a Kubernetes ServiceAccount token which it will use to authenticate with Azure.
363
363
364
-
The labels can be configured using the Helm values file below:
364
+
The label can be configured using the Helm values file below:
0 commit comments