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: articles/azure-monitor/essentials/prometheus-remote-write-active-directory.md
+38-2Lines changed: 38 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ The application requires the *Monitoring Metrics Publisher* role on the data col
80
80
> [!NOTE]
81
81
> 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.
82
82
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.
84
84
85
85
1. Run the following Azure CLI command to enable Azure Key Vault Provider for Secrets Store CSI Driver for your cluster.
86
86
@@ -104,7 +104,43 @@ This step is only required if you didn't enable Azure Key Vault Provider for Sec
104
104
az keyvault set-policy -n <keyvault-name> --certificate-permissions get --spn <identity-client-id>
105
105
```
106
106
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.
0 commit comments