Skip to content

Commit 0bb927f

Browse files
committed
return missing section
1 parent 7cbcd52 commit 0bb927f

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

articles/azure-monitor/essentials/prometheus-remote-write-active-directory.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The application requires the *Monitoring Metrics Publisher* role on the data col
8080
> [!NOTE]
8181
> Azure Key Vault CSI driver configuration is just one of the ways to get certificate mounted on the pod. The remote write container only needs a local path to a certificate in the pod for the setting `AZURE_CLIENT_CERTIFICATE_PATH` value in the [Deploy Side car and configure remote write on the Prometheus server](#deploy-side-car-and-configure-remote-write-on-the-prometheus-server) step below.
8282
83-
This step is only required if you didn't enable Azure Key Vault Provider for Secrets Store CSI Driver when you created your AKS cluster.
83+
This step is only required if you didn't enable Azure Key Vault Provider for Secrets Store CSI Driver when you created your cluster.
8484

8585
1. Run the following Azure CLI command to enable Azure Key Vault Provider for Secrets Store CSI Driver for your cluster.
8686

@@ -104,7 +104,43 @@ This step is only required if you didn't enable Azure Key Vault Provider for Sec
104104
az keyvault set-policy -n <keyvault-name> --certificate-permissions get --spn <identity-client-id>
105105
```
106106
107-
3. Create a SecretProviderClass by saving the following YAML to a file named *secretproviderclass.yml*. Replace the values for `userAssignedIdentityID`, `keyvaultName`, `tenantId` and the objects to retrieve from your key vault. See [Provide an identity to access the Azure Key Vault Provider for Secrets Store CSI Driver](../../aks/csi-secrets-store-identity-access.md) for details on values to use.
107+
3. Create a *SecretProviderClass* by saving the following YAML to a file named *secretproviderclass.yml*. Replace the values for `userAssignedIdentityID`, `keyvaultName`, `tenantId` and the objects to retrieve from your key vault. See [Provide an identity to access the Azure Key Vault Provider for Secrets Store CSI Driver](../../aks/csi-secrets-store-identity-access.md) for details on values to use.
108+
109+
```yml
110+
# This is a SecretProviderClass example using user-assigned identity to access your key vault
111+
apiVersion: secrets-store.csi.x-k8s.io/v1
112+
kind: SecretProviderClass
113+
metadata:
114+
name: azure-kvname-user-msi
115+
spec:
116+
provider: azure
117+
parameters:
118+
usePodIdentity: "false"
119+
useVMManagedIdentity: "true" # Set to true for using managed identity
120+
userAssignedIdentityID: <client-id> # Set the clientID of the user-assigned managed identity to use
121+
keyvaultName: <key-vault-name> # Set to the name of your key vault
122+
cloudName: "" # [OPTIONAL for Azure] if not provided, the Azure environment defaults to AzurePublicCloud
123+
objects: |
124+
array:
125+
- |
126+
objectName: <name-of-cert>
127+
objectType: secret # object types: secret, key, or cert
128+
objectFormat: pfx
129+
objectEncoding: base64
130+
objectVersion: ""
131+
tenantId: <tenant-id> # The tenant ID of the key vault
132+
```
133+
134+
4. Apply the *SecretProviderClass* by running the following command on your cluster.
135+
136+
```
137+
kubectl apply -f secretproviderclass.yml
138+
```
139+
140+
## Deploy Side car and configure remote write on the Prometheus server
141+
142+
1. Copy the YAML below and save to a file. This YAML assumes you're using 8081 as your listening port. Modify that value if you use a different port.
143+
108144
109145
```yml
110146
prometheus:

0 commit comments

Comments
 (0)