<p>I am developing an application which uses Pod Identity to connect to Azure Sql Database.</p>
<p>After deploying it on Azure Kubernetes Service (<strong>AKS</strong>), POD(application) connects to Azure Sql using PodIdentity (Managed Identity).</p>
<p><strong>How can I assign the same identity to POD while running on my local k8s cluster?</strong></p>
<p>My deployment yaml looks like</p>
<pre><code>kind: Deployment
metadata:
  name: xxx
  labels:
    app: xxx
spec:
  selector:
    matchLabels:
     appName: xxx
  replicas: 1
  template:
    metadata:
      labels:
        appName: xxx
        aadpodidbinding: samplepodidentity
    spec:
      containers:
      - name: xxx
        image: xxx
        env:
        - name: xxx
          value: &quot;xxx&quot;
        - name: UpdateDbTraceEndpoint
          value: &quot;xxx&quot;
        ports:
        - containerPort: 80
</code></pre>
<p><strong>Update:---------------------------</strong></p>
<p>I tried the the <a href="https://azure.github.io/aad-pod-identity/docs/demo/standard_walkthrough/" rel="nofollow noreferrer">standard walk thru</a> but still it is giving error.</p>
<p><a href="https://i.stack.imgur.com/CD23V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CD23V.png" alt="enter image description here" /></a></p>
<p><strong>According to me MIC is not working on local K8s cluster</strong>. How can I get it working?</p>

Rupesh
<p>You can deploy <a href="https://azure.github.io/aad-pod-identity/" rel="nofollow noreferrer"><code>aad-pod-identity</code></a> on your local cluster using <a href="https://azure.github.io/aad-pod-identity/docs/getting-started/installation/#helm" rel="nofollow noreferrer">helm</a> or the <a href="https://azure.github.io/aad-pod-identity/docs/getting-started/installation/#quick-install" rel="nofollow noreferrer">YAML Deployment files</a>.</p>
<p>The main difference is that you can't use some of the <code>az aks</code> commands and instead perform the steps manually like creating the <code>AzureIdentity</code> resource.</p>
<p>The <a href="https://azure.github.io/aad-pod-identity/docs/demo/standard_walkthrough/" rel="nofollow noreferrer">standard walkthrough</a> doc covers the details.</p>
