<p>I have nodeJs application with docker file deployed in AKS with HelmChart, and I have azure key vault with some keys in Azure Portal and I need to connect my running POD with that KeyVault.</p>

<p>I use <a href="https://akv2k8s.io/" rel="nofollow noreferrer">akv2k8s</a>.</p>
<p>Akv2k8s contains two main components:</p>
<ol>
<li>The akv2k8s Controller syncs Azure Key Vault objects to Kubernetes as native Secret's</li>
<li>The akv2k8s Injector injects Azure Key Vault objects as environment variables directly into your application.</li>
</ol>
<p>Diagram:</p>
<p><a href="https://i.stack.imgur.com/83ujN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/83ujN.png" alt="enter image description here" /></a></p>
<p><strong>Before you start with the installation I suggest to read <a href="https://akv2k8s.io/how-it-works/" rel="nofollow noreferrer">How it works?</a> page.</strong></p>
<p>Later on, Follow <a href="https://akv2k8s.io/installation/" rel="nofollow noreferrer">installation overview</a> page in order to set up the environment.</p>
<p>In case you want to install akv2k8s with helm. I created this code snippet for my CI\CD process :</p>
<pre class="lang-sh prettyprint-override"><code># Create a dedicated namespace for akv2k8s
kubectl create ns akv2k8s

# Add Helm repository
helm repo add spv-charts http://charts.spvapi.no
helm repo update

# Install the Controller (and the &quot;AzureKeyVaultSecret&quot; CRD)
helm install azure-key-vault-controller spv-charts/azure-key-vault-controller --namespace akv2k8s

# Install the Env-Injector
helm install azure-key-vault-env-injector spv-charts/azure-key-vault-env-injector --set installCrd=false --namespace akv2k8s
</code></pre>
<p>simple <a href="https://akv2k8s.io/tutorials/sync/1-secret/" rel="nofollow noreferrer">example</a>:</p>
<pre><code>cat &lt;&lt; EOF | kubectl apply -f -
apiVersion: spv.no/v1alpha1
kind: AzureKeyVaultSecret
metadata:
  name: secret-sync 
  namespace: $(K8S_NAMESPACE)
spec:
  vault:
    name: ${KEY_VAULT_NAME} # name of key vault
    object:
      name: $(KEY_VALUT_OBJECT_NAME)  # name of the akv object
      type: $(KEY_VALUT_TYPE) # akv object type
EOF
</code></pre>
