Search code examples
azurecontainersazure-container-instances

How do you recognize a spot container instance on Azure?


I've been making a proof of concept with the new Spot Containers from Microsoft on Azure's Container Instances offering. That all works fine as expected. But... I just can't visually verify anywhere that it's actually a spot container. Not in the portal, not in any of its properties I can retrieve via Azure CLI or anything. Does anyone have an idea or can point me in the right direction? Thanks in advance.


Solution

  • I tried to recognize a spot container instance on the Azure portal and I was able to retrieve that successfully.

    Spot container instances on Azure cannot be viewed directly, while creating the container instance, choose ‘run with azure spot discount’ to select it as Spot container instances. Since Spot container instances are subject to termination at any time. The second option is to go to your container instance and click on properties you should find the word ‘azure spot’ mentioned. Also, another way is, if your container instance has a termination policy of “Preemptible”, it is likely a spot instance.

    az container list --filter "termination policy eq 'Preemptible'"
    
    

    This info can also be achieved while creating the container instance which is to be created with Azure spot discount enabled while creating so.

    enter image description here

    Once the creation of the container instance was done then navigate through the path mentioned.

    Container instance --> Properties -->Azure Spot (Yes)

    enter image description here

    Ref: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-tutorial-deploy-spot-containers-portal