Skip to content

Commit 2dc437a

Browse files
committed
syncing changes
2 parents b56e353 + 49cb622 commit 2dc437a

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

articles/aks/csi-secrets-store-driver.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ ms.custom: template-how-to, devx-track-azurecli
1111

1212
# Use the Azure Key Vault Provider for Secrets Store CSI Driver in an AKS cluster
1313

14-
The Azure Key Vault Provider for Secrets Store CSI Driver allows for the integration of Azure Key Vault as a secrets store with an Azure Kubernetes Service (AKS) cluster via a [CSI volume][kube-csi].
14+
The Azure Key Vault Provider for Secrets Store CSI Driver allows for the integration of an Azure key vault as a secrets store with an Azure Kubernetes Service (AKS) cluster via a [CSI volume][kube-csi].
1515

1616
## Prerequisites
1717

1818
- If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
19-
2019
- Before you start, ensure that your version of the Azure CLI is 2.30.0 or later. If it's an earlier version, [install the latest version](/cli/azure/install-azure-cli).
2120

2221
### Supported AKS versions
@@ -91,7 +90,7 @@ Be sure that a Secrets Store CSI Driver pod and an Azure Key Vault Provider pod
9190

9291
## Create or use an existing Azure key vault
9392

94-
In addition to an AKS cluster, you'll need an Azure Key Vault resource that stores the secret content. Keep in mind that the key vault's name must be globally unique.
93+
In addition to an AKS cluster, you'll need an Azure key vault resource that stores the secret content. Keep in mind that the key vault's name must be globally unique.
9594

9695
```azurecli
9796
az keyvault create -n <keyvault-name> -g myResourceGroup -l eastus2
@@ -107,7 +106,7 @@ Take note of the following properties for use in the next section:
107106

108107
- The name of the secret object in the key vault
109108
- The object type (secret, key, or certificate)
110-
- The name of your Azure Key Vault resource
109+
- The name of your Azure key vault resource
111110
- The Azure tenant ID that the subscription belongs to
112111

113112
## Provide an identity to access the Azure key vault
@@ -143,7 +142,7 @@ A key vault certificate also contains public x509 certificate metadata. The key
143142
|`secret`|The private key and certificate, in PEM format|Yes|
144143
| | |
145144

146-
## Disable the Azure Key Vault Provider for Secrets Store CSI Driver on an existing AKS Cluster
145+
## Disable the Azure Key Vault Provider for Secrets Store CSI Driver on an existing AKS cluster
147146

148147
> [!NOTE]
149148
> Before you disable the add-on, ensure that no `SecretProviderClass` is in use. Trying to disable the add-on while `SecretProviderClass` exists will result in an error.
@@ -155,14 +154,14 @@ az aks disable-addons --addons azure-keyvault-secrets-provider -g myResourceGrou
155154
```
156155

157156
> [!NOTE]
158-
> If the add-on is disabled, existing workloads will have no issues and will not see any updates in the mounted secrets. If the pod restarts or a new pod is created as part of scale up event, the pod will fail to start because the driver is no longer running.
157+
> If the add-on is disabled, existing workloads will have no issues and will not see any updates in the mounted secrets. If the pod restarts or a new pod is created as part of scale-up event, the pod will fail to start because the driver is no longer running.
159158

160159
## Additional configuration options
161160

162161
### Enable and disable autorotation
163162

164163
> [!NOTE]
165-
> When the Azure Key Vault Provider for Secrets Store CSI Driver is enabled, it updates the pod mount and the Kubernetes secret that's defined in the `secretObjects` field of `SecretProviderClass`. It does so by polling for changes periodically, based on the rotation poll interval you've defined. The default rotation poll interval is 2m.
164+
> When the Azure Key Vault Provider for Secrets Store CSI Driver is enabled, it updates the pod mount and the Kubernetes secret that's defined in the `secretObjects` field of `SecretProviderClass`. It does so by polling for changes periodically, based on the rotation poll interval you've defined. The default rotation poll interval is 2 minutes.
166165

167166
To enable autorotation of secrets, use the `enable-secret-rotation` flag when you create your cluster:
168167

@@ -192,7 +191,7 @@ az aks update -g myResourceGroup -n myAKSCluster2 --disable-secret-rotation
192191

193192
You might sometimes want to create a Kubernetes secret to mirror the mounted content.
194193

195-
When you create a `SecretProviderClass`, use the `secretObjects` field to define the desired state of Kubernetes secrets, as shown in the following example.
194+
When you create a `SecretProviderClass`, use the `secretObjects` field to define the desired state of the Kubernetes secret, as shown in the following example.
196195

197196
> [!NOTE]
198197
> The example here is incomplete. You'll need to modify it to support your chosen method of access to your key vault identity.
@@ -209,15 +208,15 @@ spec:
209208
secretObjects: # [OPTIONAL] SecretObjects defines the desired state of synced Kubernetes secret objects
210209
- data:
211210
- key: username # data field to populate
212-
objectName: foo1 # name of the mounted content to sync. this could be the object name or the object alias
211+
objectName: foo1 # name of the mounted content to sync; this could be the object name or the object alias
213212
secretName: foosecret # name of the Kubernetes secret object
214213
type: Opaque # type of Kubernetes secret object (for example, Opaque, kubernetes.io/tls)
215214
```
216215

217216
> [!NOTE]
218217
> Make sure that the `objectName` in the `secretObjects` field matches the file name of the mounted content. If you use `objectAlias` instead, it should match the object alias.
219218

220-
#### Set environment variables to reference Kubernetes secrets
219+
#### Set an environment variable to reference Kubernetes secrets
221220

222221
After you've created the Kubernetes secret, you can reference it by setting an environment variable in your pod, as shown in the following example code:
223222

@@ -259,14 +258,14 @@ spec:
259258

260259
### The Azure Key Vault Provider
261260

262-
Metrics are served via Prometheus from port 8898, but this port is not exposed outside the pod by default. Access the metrics over localhost by using `kubectl port-forward`:
261+
Metrics are served via Prometheus from port 8898, but this port isn't exposed outside the pod by default. Access the metrics over localhost by using `kubectl port-forward`:
263262

264263
```bash
265264
kubectl port-forward -n kube-system ds/aks-secrets-store-provider-azure 8898:8898 &
266265
curl localhost:8898/metrics
267266
```
268267

269-
The following table lists the metrics provided by the Azure Key Vault Provider for Secrets Store CSI Driver:
268+
The following table lists the metrics that are provided by the Azure Key Vault Provider for Secrets Store CSI Driver:
270269

271270
|Metric|Description|Tags|
272271
|----|----|----|
@@ -287,7 +286,7 @@ The following table lists the metrics provided by the Secrets Store CSI Driver:
287286

288287
|Metric|Description|Tags|
289288
|----|----|----|
290-
|total_node_publish|The The total number of successful volume mount requests|`os_type=<runtime os>`, `provider=<provider name>`|
289+
|total_node_publish|The total number of successful volume mount requests|`os_type=<runtime os>`, `provider=<provider name>`|
291290
|total_node_unpublish|The total number of successful volume unmount requests|`os_type=<runtime os>`|
292291
|total_node_publish_error|The total number of errors with volume mount requests|`os_type=<runtime os>`, `provider=<provider name>`, `error_type=<error code>`|
293292
|total_node_unpublish_error|The total number of errors with volume unmount requests|`os_type=<runtime os>`|

articles/aks/csi-secrets-store-identity-access.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.custom: devx-track-azurecli
1313

1414
The Secrets Store CSI Driver on Azure Kubernetes Service (AKS) provides a variety of methods of identity-based access to your Azure key vault. This article outlines these methods and how to use them to access your key vault and its contents from your AKS cluster. For more information, see [Use the Secrets Store CSI Driver][csi-secrets-store-driver].
1515

16-
## Use pod identity
16+
## Use pod identities
1717

1818
Azure Active Directory (Azure AD) pod-managed identities use AKS primitives to associate managed identities for Azure resources and identities in Azure AD with pods. You can use these identities to grant access to the Azure Key Vault Secrets Provider for Secrets Store CSI driver.
1919

@@ -24,7 +24,7 @@ Azure Active Directory (Azure AD) pod-managed identities use AKS primitives to a
2424

2525
### Usage
2626

27-
1. Follow the instructions in [Use Azure Active Directory pod-managed identities in Azure Kubernetes Service (Preview)][aad-pod-identity-create] to create a cluster identity, assign it permissions, and create a pod identity. Take note of the newly-created identity's `clientId` and `name`.
27+
1. Follow the instructions in [Use Azure Active Directory pod-managed identities in Azure Kubernetes Service (Preview)][aad-pod-identity-create] to create a cluster identity, assign it permissions, and create a pod identity. Take note of the newly created identity's `clientId` and `name`.
2828

2929
1. Assign permissions to the new identity to enable it to read your key vault instance and view its contents by running the following commands:
3030

@@ -295,7 +295,7 @@ Azure Active Directory (Azure AD) pod-managed identities use AKS primitives to a
295295
296296
## Next steps
297297
298-
To validate that the secrets are mounted at the volume path specified in your pod's YAML, see [Use the Azure Key Vault Provider for Secrets Store CSI Driver in an AKS cluster][validate-secrets].
298+
To validate that the secrets are mounted at the volume path that's specified in your pod's YAML, see [Use the Azure Key Vault Provider for Secrets Store CSI Driver in an AKS cluster][validate-secrets].
299299
300300
<!-- LINKS INTERNAL -->
301301

articles/aks/csi-secrets-store-troubleshooting.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ Error message in logs/events:
4040
Warning FailedMount 74s kubelet MountVolume.SetUp failed for volume "secrets-store-inline" : kubernetes.io/csi: mounter.SetupAt failed: rpc error: code = Unknown desc = failed to mount secrets store objects for pod default/test, err: rpc error: code = Unknown desc = failed to mount objects, error: failed to get keyvault client: failed to get key vault token: nmi response failed with status code: 404, err: <nil>
4141
```
4242

43-
Description: The Node Managed Identity (NMI) component in aad-pod-identity returned an error for a token request. For more information about the error, check the NMI pod logs and refer to the Azure AD Pod Identity [troubleshooting guide][aad-troubleshooting] to resolve the issue.
43+
Description: The Node Managed Identity (NMI) component in *aad-pod-identity* returned an error for a token request. For more information about the error and to resolve it, check the NMI pod logs and refer to the [Azure AD pod identity troubleshooting guide][aad-troubleshooting].
4444

4545
> [!NOTE]
46-
> Azure Active Directory (Azure AD) is shortened to *aad* in the *aad-pod-identity* string.
46+
> Azure Active Directory (Azure AD) is abbreviated as *aad* in the *aad-pod-identity* string.
4747
4848
### keyvault.BaseClient#GetSecret: Failure sending request: StatusCode=0 – Original Error: context canceled
4949

@@ -54,11 +54,13 @@ E1029 17:37:42.461313 1 server.go:54] failed to process mount request, err
5454
```
5555

5656
<<<<<<< HEAD
57+
<<<<<<< HEAD
58+
=======
59+
>>>>>>> 49cb622d465041b17932527dc9841174845599e4
5760
Description: The provider pod is unable to access the key vault instance for either of the following reasons:
5861
- A firewall rule is blocking egress traffic from the provider.
5962
- Network policies that are configured in the AKS cluster are blocking egress traffic.
60-
61-
The provider pods run on hostNetwork. A failure could occur if a policy is blocking this traffic or there are network jitters on the node. Check for policies that are configured to block traffic, and place the provider pods on the allowlist. Also, ensure that there is connectivity to Azure AD and your key vault from the node.
63+
- The provider pods run on hostNetwork. A failure could occur if a policy is blocking this traffic or there are network jitters on the node. Check for policies that are configured to block traffic, and place the provider pods on the allowlist. Also, ensure that there is connectivity to Azure AD and your key vault from the node.
6264

6365
You can test the connectivity to your Azure key vault from the pod that's running on the host network by doing the following:
6466

@@ -101,6 +103,7 @@ You can test the connectivity to your Azure key vault from the pod that's runnin
101103
```bash
102104
curl -X GET 'https://<KEY_VAULT_NAME>.vault.azure.net/secrets/<SECRET_NAME>?api-version=7.2' -H "Authorization: Bearer <ACCESS_TOKEN_ACQUIRED_ABOVE>"
103105
```
106+
<<<<<<< HEAD
104107
=======
105108
It means the provider pod is unable to access the AKV instance because:
106109
@@ -150,6 +153,8 @@ You can test Key Vault connectivity from pod running on host network as follows:
150153
curl -X GET 'https://<KEY_VAULT_NAME>.vault.azure.net/secrets/<SECRET_NAME>?api-version=7.2' -H "Authorization: Bearer <ACCESS_TOKEN_ACQUIRED_ABOVE>"
151154
```
152155
>>>>>>> b90873b7593e0a387bf1a446e73da21779059895
156+
=======
157+
>>>>>>> 49cb622d465041b17932527dc9841174845599e4
153158
154159
<!-- LINKS EXTERNAL -->
155160
[aad-troubleshooting]: https://azure.github.io/aad-pod-identity/docs/troubleshooting/

0 commit comments

Comments
 (0)