title: Hosted solution to extract data per namespace in Azure AKS
body: <p>We have couple of clusters running in Azure using AKS service. In clusters we are running multiple projects, each one of them has different namespace, naturally.</p>
  <p>I would like to extract data about number of pods, their status and conditions etc. for specific namespace.
  It is fairly easy to do locally using <code>AZ CLI</code> and installing <code>kubectl</code> (to get namespaces names) and then we can either stay in <code>kubectl</code> or use powershell <code>Az.Aks</code> <a href="https://docs.microsoft.com/en-us/powershell/module/az.aks/?view=azps-4.5.0" rel="nofollow noreferrer">module</a> to extract these information.</p>
  <p>I would like to have this process fully automated and scheduled. My first thought was Azure Runbook but it is not supporting AZ CLI.</p>
  <p>What would be the best way to achieve what I have mentioned above? I believe the best way would be to use only <code>kubectl</code> commands, but how can we trigger them automatically? Is a pipeline in Azure Devops a solution?</p>
  <p>Thanks,
  Rafal</p>