title: Kubernetes / Prometheus Metrics Mismatch
body: <p>I have an application running in Kubernetes (Azure AKS) in which each pod contains two containers. I also have Grafana set up to display various metrics some of which are coming from Prometheus. I'm trying to troubleshoot a separate issue and in doing so I've noticed that some metrics don't appear to match up between data sources.</p>
  
  <p>For example, <code>kube_deployment_status_replicas_available</code> returns the value 30 whereas <code>kubectl -n XXXXXXXX get pod</code> lists 100 all of which are Running, and <code>kube_deployment_status_replicas_unavailable</code> returns a value of 0. Also, if I get the deployment in question using <code>kubectl</code> I'm seeing the expected value.</p>
  
  <pre><code>$ kubectl get deployment XXXXXXXX
  NAME       DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
  XXXXXXXX   100       100       100          100         49d
  </code></pre>
  
  <p>There are other applications (namespaces) in the same cluster where all the values correlate correctly so I'm not sure where the fault may be or if there's any way to know for sure which value is the correct one. Any guidance would be appreciated. Thanks</p>