All Products
Search
Document Center

Batch Compute:Use spot instance

Last Updated:Jun 17, 2020

View available spot instances

  1. bcs t

In the result, “Spot Instance types” are available spot instances.

Use environment variables

1. Submit an AutoCluster job

Set resource_type to Spot, and then select one spot instance type.

  1. bcs sub "python demo.py" --resource_type Spot -t ecs.s3.large

2. Create a cluster

  1. bcs cc clusterName --resource_type Spot -t ecs.s3.large -i img-ubuntu