Skip to content

feat(pod): add spot pod support with --bid-per-gpu flag #236

@TimPietruskyRunPod

Description

@TimPietruskyRunPod

Summary

The new pod create command (v2.0.0) has no way to create spot instances. The old deprecated start pod command supported this via --bid and the podRentInterruptable GraphQL mutation, but that code path is deprecated.

Desired behavior

runpodctl pod create --template-id <id> --gpu-id "NVIDIA RTX 4090" --bid-per-gpu 0.20

When --bid-per-gpu is provided, use the podRentInterruptable mutation instead of podFindAndDeployOnDemand.

Reference

PR #186 implemented this for the legacy CLI — see the approach there for the GraphQL mutation and flag handling. Key pieces:

  • bidPerGpu field in the GraphQL input
  • podRentInterruptable mutation
  • Validation: bid must be > 0

Files to modify

  • cmd/pod/create.go — add --bid-per-gpu flag
  • internal/api/graphql.go — add podRentInterruptable mutation support

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions