Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Azure Pipeline to Deploy into AKS

The azureSubscription field in the Azure DevOps pipeline YAML refers to the name or ID of the Azure service connection that you set up in Azure DevOps to authenticate and authorize the pipeline to interact with your Azure resources (e.g., your AKS cluster).

In Azure DevOps, this service connection represents the credentials (usually based on a Service Principal) that the pipeline will use to perform tasks such as deploying to AKS, accessing other Azure resources, etc.

Steps to find or create the azureSubscription value:

  1. Go to Azure DevOps:
    • Navigate to your Azure DevOps project.
  2. Project Settings:
    • In the lower-left corner, click on Project settings.
  3. Service connections:
    • Under Pipelines, click on Service connections.
    • You should see a list of service connections if any are already set up. These represent the available Azure subscriptions that your pipeline can use.
  4. Find the correct service connection:
    • The azureSubscription value should match the name of the service connection listed here. For example, it might be something like MyAzureServiceConnection, or in your case, the name of the subscription you’re authorized to use.
  5. Create a new service connection (if necessary):
    • If you don’t have a service connection set up, click New service connection.
    • Choose Azure Resource Manager and follow the steps to create a new connection using either:
      • Service Principal (automatic) (recommended) – this will automatically set up a Service Principal and permissions for you.
      • Service Principal (manual) – this allows you to manually enter details such as Subscription ID, Service Principal ID, and Secret if you’ve set up credentials manually in Azure.
    • After setting it up, you can use the name of this service connection in your pipeline YAML.
  6. Use in the pipeline:
Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x