title: Azure pipeline - How to execute kubectl command
body: <p>I am trying to delete all namespaces prefixed with &quot;dev-...&quot;. The command works fine on the commandline, but I'm not sure how to get this working in Azure Pipelines.</p>
  <pre><code>kubectl get namespaces --no-headers=true -o custom-columns=:metadata.name | grep dev- | xargs kubectl delete namespace
  </code></pre>