<p>I try to do the following tutorial but I have a problem.</p>

<p><a href="https://devblogs.microsoft.com/devops/announcing-kubernetes-integration-for-azure-pipelines/" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/kubernetes/aks-template?view=azure-devops</a></p>

<p><a href="https://devblogs.microsoft.com/devops/announcing-kubernetes-integration-for-azure-pipelines/" rel="nofollow noreferrer">https://devblogs.microsoft.com/devops/announcing-kubernetes-integration-for-azure-pipelines/</a></p>

<p>I want to deploy a simple node app in my kubernetes cluster but the YAML Template "Deploy to Azure Kubernetes Service" doesn't appear. Any idea why this could happen? It worked yesterday but now the option is gone.</p>

<p>Here is the link to my git repo:</p>

<p><a href="https://github.com/StephanPillhofer/SimpleNodeApp" rel="nofollow noreferrer">https://github.com/StephanPillhofer/SimpleNodeApp</a></p>

<p>Any help very welcome.</p>

Stephan Pillhofer
<p>Well, as you mentioned in comments the Kubernetes cluster located under Azure (AKS), therefore you can use the following steps which I find easier to maintain and more straight forward :</p>

<p>First of all, Get credentials from AKS using Azure CLI using <a href="https://learn.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest#az-aks-get-credentials" rel="nofollow noreferrer">az aks get-credentials</a>.
This command gets access credentials for a managed Kubernetes cluster and allows you to run <code>kubectl</code> commands from the agent:</p>

<pre><code>steps:
- task: AzureCLI@1
  displayName: 'Azure CLI - get credentials from aks'
  inputs:
    azureSubscription: '$(azure_subscription)'
    scriptLocation: inlineScript
    inlineScript: 'az aks get-credentials --resource-group $(resource_group_name) --name $(cluster_name)'
</code></pre>

<p>Now, you can run any <code>kubectl</code> command using a bash script.</p>

<p>For instance :</p>

<pre><code> bash: |
  kubectl apply -f manifest.yml
  displayName: 'Kubectl apply my manifest.yaml'
</code></pre>

<p>In my opinion, it's better using bash scripts instead of depending on extensions. And, if you want to migrate your Yaml to another resource such as Jenkins you can do it easily.</p>

<p><a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands" rel="nofollow noreferrer">Kubectl commands</a>.</p>
