Config

Certain configuration settings can be set globally for Kubetorch, such as a unique username, default namespace, or installation url to use. More options to be added soon.

Config Class

class kubetorch.config.KubetorchConfig
property username

Username to use for Kubetorch deployments.

Used for authentication and resource naming. Will be validated to ensure Kubernetes compatibility.

property license_key

License key for authentication and billing.

Required for usage reporting and cluster authentication. Can be found in the basic install guide.

property queue

Default queue name for scheduling services.

Controls how cluster resources are allocated and prioritized for services. See scheduling and queues for more info.

property namespace

Default Kubernetes namespace for Kubetorch deployments.

All services will be deployed to this namespace unless overridden in the Compute resource constructor.

Priority:
  1. Explicit override

  2. Environment variable

  3. File cache

  4. In-cluster namespace or kubeconfig current context

property install_url

URL of the Kubetorch version to install.

Used when installing Kubetorch in a Docker image or remote environment. Can be found in the basic install guide.

property log_verbosity

Verbosity of logs streamed from a remote deployment. Log levels include debug, info, and critical. Default is info.

Note

Only relevant when stream_logs is set to true.

property stream_logs

Whether to stream logs for Kubetorch services.

When enabled, logs from remote services are streamed back to your local environment in real-time. Verbosity of the streamed logs can be controlled with log_verbosity. Default is True.

Note

Requires log streaming to be configured in your cluster.

property tracing_enabled

Whether to enable distributed tracing for services.

When enabled, provides detailed trace information for debugging and monitoring Kubetorch deployments. Default is False.

Note

Requires telemetry stack to be configured. See traces for more info.

write(user_values: dict | None = None)

Write out config to local ~/.kt/config.yaml, to be used globally.