<p>I have so far been unable to find any azure library for creating a node within an AKS cluster. I can use the azure cli, but my goal is to use python.</p>

<p>I can create the resource and resource groups using the azure python SDK -  resource_groups.create_or_update('azure-sample-group', resource_group_params)</p>

<p>Can someone point me to the right docs or some tips? I appreciate all your help.</p>

<p>you can do that, <a href="https://learn.microsoft.com/en-us/python/api/azure-mgmt-containerservice/azure.mgmt.containerservice.v2018_03_31.operations.managedclustersoperations?view=azure-python#create-or-update-resource-group-name--resource-name--parameters--custom-headers-none--raw-false--polling-true----operation-config-" rel="nofollow noreferrer">here's the docs</a> for the method(s) you are looking for. <a href="https://github.com/Azure/azure-sdk-for-python/blob/master/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_08_01_preview/operations/managed_clusters_operations.py" rel="nofollow noreferrer">Here's the SDK code</a> for the same stuff. Model for <a href="https://learn.microsoft.com/en-us/python/api/azure-mgmt-containerservice/azure.mgmt.containerservice.v2018_03_31.models.managedcluster?view=azure-python" rel="nofollow noreferrer">Managed Clusters</a></p>

<p>Example code would be something like:</p>

<pre><code>from azure.mgmt.containerservice import ContainerServiceClient # needed to create client
containerservice_client = ContainerServiceClient(get_credentials(), SUBSCRIPTION) # same way like you would for the resource_management_client
parameters = ManagedCluster(
    location=location,
    dns_prefix=dns_prefix,
    kubernetes_version=kubernetes_version,
    tags=stags,
    service_principal_profile=service_principal_profile, # this needs to be a model as well
    agent_pool_profiles=agent_pools, # this needs to be a model as well
    linux_profile=linux_profile, # this needs to be a model as well
    enable_rbac=true
)
containerservice_client.managed_clusters.create_or_update(resource_group, name, parameters)
</code></pre>
