Skip to main content
When we define the task config, we will need to define the resources that the task will need for successful execution. This will ensure that Kubernetes can allot the correct set of resources and the application continues to run smoothly.

Setting up the resources in Task Config

You can specify the resources for each task in task config. Each task config takes resource as an argument where you can define the resource limit based on the workload of that task. Here is a sample resources object.
Here is a brief explanation of what the different fields refer to:

Using spot instances to run tasks

TrueFoundry supports different capacity types for node selection, allowing you to optimize costs while maintaining reliability. You can configure this through the NodeSelector in your resource configuration.

Available Capacity Types

  1. spot - Uses spot instances exclusively
    1. Most cost-effective option (up to 70% cheaper than on-demand)
    2. Suitable for fault-tolerant workloads
    3. Risk of interruption if spot capacity is unavailable
  2. on_demand - Uses on-demand instances exclusively
    • Highest availability and reliability
    • No interruption risk
    • Standard pricing
  3. spot_fallback_on_demand - Uses spot instances with automatic fallback to on_demand instances
    • Attempts to use spot instances first
    • Automatically falls back to on-demand if spot is unavailable
    • Balances cost savings with reliability