Configuration#
Kinetic uses environment variables, decorator arguments, CLI flags, and optionally named profiles for configuration. This page is the source of truth for what each one does, what the defaults are, and how they come together when they disagree.
If you work with more than one cluster or project, consider saving
those combinations as profiles — they remove the
need to re-export KINETIC_* env vars each time you switch.
Environment variables#
Variable |
Used by |
Default |
Description |
|---|---|---|---|
|
CLI + decorators |
(required) |
GCP project ID. Falls back to |
|
CLI + decorators |
|
GCP zone for jobs and clusters. |
|
CLI + decorators |
|
GKE cluster name. |
|
CLI + decorators |
|
Kubernetes namespace. |
|
Decorator (prebuilt mode) |
|
Repo for prebuilt base images. See Execution Modes. |
|
CLI + remote pod |
|
Per-job durable artifact prefix. See Checkpointing. |
|
|
(unset) |
GCP capacity reservation to consume. Pool-level config, not a per-job setting. |
|
Library |
|
|
|
Library + remote pod |
|
Seconds the remote pod waits for a debugger client to attach when |
Set them in your shell profile (~/.bashrc, ~/.zshrc) so they
persist across sessions:
export KINETIC_PROJECT="my-gcp-project-id"
export KINETIC_ZONE="us-central1-a"
Precedence#
When the same setting can come from multiple sources, the highest one wins:
Setting |
Decorator arg |
CLI flag |
Env var |
Active profile |
Built-in default |
|---|---|---|---|---|---|
Project |
|
|
|
|
(required) |
Zone |
|
|
|
|
|
Cluster |
|
|
|
|
|
Namespace |
|
|
|
|
|
Output dir |
|
|
|
(n/a) |
|
Base image repo |
|
|
|
(n/a) |
|
Reservation* |
(n/a) |
|
|
(n/a) |
(unset) |
* Reservation is a node-pool-level setting, not a per-job one. You bind
a reservation to a pool when you create the pool with kinetic pool add,
and any job that lands on that pool consumes it. Because of that there is
no decorator argument; jobs select pools indirectly via accelerator=.
Read left to right: a decorator argument always beats a CLI flag, which beats an env var, which beats a profile field, which beats the built-in default. Concretely:
@kinetic.run(accelerator="tpu-v6e-8", project="explicit-project")
def train(): ...
uses explicit-project even if KINETIC_PROJECT is set to something
else.
Logging#
Kinetic uses absl-py for logging. Set KINETIC_LOG_LEVEL to control
verbosity:
DEBUG — packaging details, dependency hashing, build pipeline, GKE submission.
INFO — major lifecycle milestones (default).
WARNING / ERROR / FATAL — only the named severity and above.
export KINETIC_LOG_LEVEL=DEBUG
Pulumi state#
Kinetic stores its Pulumi state in a Google Cloud Storage bucket
derived from the GCP project: gs://{project}-kinetic-state. The
bucket is created on first use (idempotent), with versioning
enabled and uniform bucket-level access, no public ACL.
Multiple clusters in one project share the bucket but get separate
stacks (named {project}-{cluster}), so a team running against the
same GCP project automatically converges on one authoritative state.
IAM#
Kinetic uses Application Default Credentials, the same auth path as
gcloud. The first admin to run kinetic up for a project needs
roles/storage.admin so the state bucket can be created. Every other
team member only needs roles/storage.objectAdmin on the bucket to
read and write state.
Where to look#
If a setting isn’t behaving the way you expect, kinetic config prints
the resolved value of the most common variables (project, zone,
cluster, namespace, output dir, and the per-project Pulumi state
bucket) and where each came from (env var,
profile, or default). Run it before reaching
for kinetic init’s troubleshoot path. Variables that aren’t shown there
(KINETIC_BASE_IMAGE_REPO, KINETIC_RESERVATION, KINETIC_LOG_LEVEL,
KINETIC_DEBUG_WAIT_TIMEOUT) can be inspected with env | grep KINETIC_.