Skip to content
Kapten
Esc
↑↓navigate↵open⌘Jpreview
On this page

kapten environments

Create and manage the environments of a project.

Every command takes the global flags.

kapten environments create

Creates an environment in a project, on one of the organization’s clusters.

kapten environments create <project-id> <body...> [flags]
Argument Description
project-id The unique identifier for the project
body... The request body, as shorthand or JSON. See Request bodies.
Flag Description
--rsh-generate-body Print an example request body and exit
--rsh-validate Validate the JSON request body against the OpenAPI schema before sending

Request body fields, * for required:

{
  cluster_id*: (string format:uuid) A universally unique identifier (UUID) string
  name*: (string pattern:\S minLen:1) The name of the environment.
  type*: (string enum:development,staging,production) The type of the environment.
}

Example:

kapten environments create <project-id> 'cluster_id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a", name: string, type: development'

kapten environments delete

Deletes an environment, with its variables and secrets. This cannot be undone.

kapten environments delete <project-id> <environment-id> [flags]
Argument Description
project-id The unique identifier for the project
environment-id The unique identifier of the environment

Example:

kapten environments delete <project-id> <environment-id>

kapten environments get

Returns an environment.

kapten environments get <project-id> <environment-id> [flags]
Argument Description
project-id The unique identifier for the project
environment-id The unique identifier of the environment

Example:

kapten environments get <project-id> <environment-id>

kapten environments list

Returns a project’s environments, a page at a time.

kapten environments list <project-id> [flags]
Argument Description
project-id The unique identifier for the project
Flag Description
--filter-with-deleted Include deleted instances (default: false)
--page-limit int Maximum number of records to return (default: 10)
--page-number int Page number (default: 1)

Example:

kapten environments list <project-id>

kapten environments update

Updates an environment. Fields left out keep their value.

kapten environments update <project-id> <environment-id> <body...> [flags]
Argument Description
project-id The unique identifier for the project
environment-id The unique identifier of the environment
body... The request body, as shorthand or JSON. See Request bodies.
Flag Description
--rsh-generate-body Print an example request body and exit
--rsh-validate Validate the JSON request body against the OpenAPI schema before sending

Request body fields, * for required:

{
  name: (string pattern:\S minLen:1) The updated name of the environment.
}

Example:

kapten environments update <project-id> <environment-id> 'name: string'

Was this page helpful?