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:
- Go to Azure DevOps:
- Navigate to your Azure DevOps project.
- Project Settings:
- In the lower-left corner, click on Project settings.
- 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.
- Find the correct service connection:
- The
azureSubscriptionvalue should match the name of the service connection listed here. For example, it might be something likeMyAzureServiceConnection, or in your case, the name of the subscription you’re authorized to use.
- The
- 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.
- Use in the pipeline:
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals