Skip to content
Docs

'hyve environment'

An environment is a named scope within your organization on a hyve-api server — default, staging, production, and so on. Clusters are created in one, and two environments can each have a cluster with the same name. Every organization starts with default. Cluster mode only.

Commands

Terminal window
hyve environment list # your organization's environments, marking the selected one
hyve environment create <name> # add one
hyve environment delete <name> # refused while it still has clusters
hyve environment use <name> # select it for cluster commands
hyve environment unset # clear the selection
hyve environment current # show the selection

These act on the organization you’re acting in (hyve organization use), or another one for a single command with the global --org <name>.

Selecting an environment

use records the selection on the active context, and every cluster-mode command then sends it to the server until you change it. Each context keeps its own selection, so hyve context use switches environments with it.

Terminal window
hyve environment use staging
hyve cluster list # staging's clusters only
hyve cluster create web --file web.yaml
hyve cluster show web --env default # one-off override for a single command

The global --env flag overrides the selection for one command.