<p>I'm working on integrating AKV and AKS, although I'm hitting a number of <a href="https://stackoverflow.com/questions/66191176/unable-to-get-azure-key-vault-integrated-with-azure-kubernetes-service">road blocks</a>.</p>
<p>At any rate, what I want to ultimately do is automate pulling credentials and API keys from it for local dev clusters too. That way, devs don't have to be bothered with &quot;go here&quot;, &quot;do <em>x</em>&quot;, etc. They just start-up their dev cluster, the keys and credentials, are pulled automatically and can be managed from a central location.</p>
<p>The AKV and AKS integration, if I could get it working, makes sense because it is the same context. The local dev environments will be entirely different, <code>minikube</code>, clusters so a different context.</p>
<p>I'm trying to wrap my brain around how to grab the keys in the local dev cluster:</p>
<p>Will the <code>secrets-store.csi.k8s.io</code> in the following be available to use for local dev clusters (as taken from the <a href="https://learn.microsoft.com/en-us/azure/key-vault/general/key-vault-integrate-kubernetes" rel="nofollow noreferrer">AKV-AKS integration documentation</a>)?</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: nginx-secrets-store-inline
  labels:
    aadpodidbinding: azure-pod-identity-binding-selector
spec:
  containers:
    - name: nginx
      image: nginx
      volumeMounts:
        - name: secrets-store-inline
          mountPath: &quot;/mnt/secrets-store&quot;
          readOnly: true
  volumes:
    - name: secrets-store-inline
      csi:
        driver: secrets-store.csi.k8s.io
        readOnly: true
        volumeAttributes:
          secretProviderClass: azure-kvname
</code></pre>
<p>Or do I need to do something like the following as it is outlined <a href="https://learn.microsoft.com/en-us/azure/key-vault/secrets/quick-create-cli#add-a-secret-to-key-vault" rel="nofollow noreferrer">here</a>?</p>
<pre><code>az keyvault secret show --name &quot;ExamplePassword&quot; --vault-name &quot;&lt;your-unique-keyvault-name&gt;&quot; --query &quot;value&quot;
</code></pre>

<blockquote>
<p>Will the secrets-store.csi.k8s.io in the following be available to use for local dev clusters (as taken from the AKV-AKS integration documentation)?</p>
</blockquote>
<p>No, it will not be available in local.</p>
<p>The <code>secrets-store.csi.k8s.io</code> uses <a href="https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview" rel="nofollow noreferrer">managed identity(MSI)</a> to access the keyvault, essentially makes an API call to azure instance metadeta endpoint to get the access token, then use the token to get the secret automatically, it is just available in an Azure environment supported MSI.</p>
<blockquote>
<p>Or do I need to do something like the following as it is outlined here?</p>
</blockquote>
<p>Yes, to get the secret from azure keyvault in local, your option is to do that manually, for example use the Azure CLI <code>az keyvault secret show</code> you mentioned.</p>
