Get Started
| Product | Versions |
|---|---|
| .NET | |
| .NET Standard |
README
Azure Provisioning ContainerService client library for .NET
Azure.Provisioning.ContainerService simplifies declarative resource provisioning in .NET.
Getting started
Install the package
Install the client library for .NET with NuGet:
dotnet add package Azure.Provisioning.ContainerService
Prerequisites
You must have an Azure subscription.
Authenticate the Client
Key concepts
This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates.
Examples
Create An AKS Cluster
This example demonstrates how to create an Azure Kubernetes Service (AKS) cluster with SSH authentication and system agent pool, based on the Azure quickstart template.
Infrastructure infra = new();
ProvisioningParameter dnsPrefix = new(nameof(dnsPrefix), typeof(string));
infra.Add(dnsPrefix);
ProvisioningParameter linuxAdminUsername = new(nameof(linuxAdminUsername), typeof(string));
infra.Add(linuxAdminUsername);
ProvisioningParameter sshRsaPublicKey = new(nameof(sshRsaPublicKey), typeof(string));
infra.Add(sshRsaPublicKey);
ContainerServiceManagedCluster aks =
new(nameof(aks), ContainerServiceManagedCluster.ResourceVersions.V2026_01_01)
{
ClusterIdentity = new ManagedClusterIdentity { IdentityType = ManagedServiceIdentityType.SystemAssigned },
DnsPrefix = dnsPrefix,
LinuxProfile =
new ContainerServiceLinuxProfile
{
AdminUsername = linuxAdminUsername,
SshPublicKeys =
{
new ContainerServiceSshPublicKey { KeyData = sshRsaPublicKey }
}
},
AgentPoolProfiles =
{
new ManagedClusterAgentPoolProfile
{
Name = "agentpool",
VmSize = "standard_d2s_v3",
OSDiskSizeInGB = 0, // 0 means default disk size for that agent
Count = 3,
OSType = ContainerServiceOSType.Linux,
Mode = AgentPoolMode.System
}
}
};
infra.Add(aks);
Troubleshooting
- File an issue via GitHub Issues.
- Check previous questions or ask new ones on Stack Overflow using Azure and .NET tags.
Next steps
Contributing
For details on contributing to this repository, see the contributing guide.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (for example, label, comment). Follow the instructions provided by the bot. You'll only need to do this action once across all repositories using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any other questions or comments.
Downloads by Version
Depended On By
Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.