Can you create an azure aks cluster with ephemeral os disk using python sdk ?

Rhys Green 1 Reputation point
2022-09-27T12:15:49.717+00:00

I'm deploying some code with azure aks and think an ephemeral os disk would be beneficial but I can't see a way to include this setting with the python SDK. Is this possible at the moment?

Cheers
Rhys

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,341 questions
Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,458 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2022-09-27T19:00:49.64+00:00

    @Rhys Green

    I understand you are wanting to set the OS disk for your AKS cluster to ephemeral using the python sdk. This blog post covers lots of helpful information regarding ephemeral disks and AKS, though it does not contain specific information on python. According to this the default should be ephemeral if the VM type supports an ephemeral OS disk. "When a user does not explicitly request managed OS disks (e.g. using the --node-osdisk-type Managed parameter in an az aks create or in an az aks nodepool add command), AKS will default to ephemeral OS disks whenever possible for a given node pool configuration."

    Please deploy your cluster using an ephemeral compatible VM. You can verify the cluster is using an ephemeral disk with the command here.

    Hope this helps. If you still need assistance, please let me know!

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

  2. Rhys Green 1 Reputation point
    2022-09-30T12:44:56.233+00:00

    I'm using the python sdk and running:

     prov_config = AksCompute.provisioning_configuration(  
         cluster_purpose="FastProd",  
         vm_size="Standard_F8s_v2",  
         agent_count=3,  
     )  
     aks_target = ComputeTarget.create(  
         workspace=ws, name=aks_name, provisioning_configuration=prov_config  
     )  
     inf_config = InferenceConfig(  
            environment=env, source_directory="./", entry_script=entry_script  
        )  
     deployment_config = AksWebservice.deploy_configuration(  
                 cpu_cores=6,  
                 memory_gb=10,  
                 autoscale_enabled=True,)  
    
     service = Model.deploy(  
            workspace = ws,  
            name = service_name,   
            models = model,  
            inference_config = inf_config,  
            deployment_config = deployment_config,  
            deployment_target = aks_target,  
            overwrite=True,)  
    

    This then produces the cluster shown in the image below.

    246476-image.png


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.