Concepts¶
Hierarchy¶
| Level | Scope |
|---|---|
| Organization | Billing, team, apex domains |
| Project | Environments, access keys, hosted git, conversations |
| Environment | Isolated resources, keys, and quotas (space_id in APIs) |
| Stack | Desired state of one environment, declared in stack.json |
Resources and keys in one environment are not visible in another. Switch or create environments with kernstack use [ENV].
Stacks¶
stack.json has five top-level sections: stack (identity), hooks and apps (CLI-only build steps), gateway (routes), and resources. See the IaC reference.
kernstack plan # preview drift
kernstack deploy # reconcile live state
kernstack inspect # list live resources
Resources are managed only through stack.json. The console shows the same state and handles data operations (table items, bucket objects).
Deployment zones¶
A zone (for example eu-preview-2) is where resources run and data is stored. Data stays in its zone. The zone is set when the environment is created; in CI set KERNSTACK_DZONE.
Access keys¶
Every API request is signed with an access key pair (ID + secret), scoped to one environment. The CLI mints keys during init / use; create more in the console under Settings → Access keys. Never commit secrets — use secrets or .stack.env.
Domains¶
Register and verify the apex domain in the console under Settings → Domains, then bind hostnames on routes with gateway.routes[].domains[].
Limits¶
Quotas cap operations per environment and service. Exceeding a rate limit returns 429 Too Many Requests — retry with exponential backoff (the Go SDK does this for you).