Skip to main content

Environment Variables

Purpose: For platform engineers, provides the environment variables the CLI reads and clarifies which ones belong to GA infrastructure providers versus service integrations.

Precedence

When the same setting is available through multiple sources, the CLI resolves in this order (highest wins):

  1. CLI --set flags
  2. Environment variables
  3. Config file values
  4. Schema defaults

CLI Variables

VariableDescriptionDefault
OPENCENTER_CLUSTERActive cluster nameSet by opencenter cluster select
OPENCENTER_CONFIG_DIRRoot configuration directory~/.config/opencenter
OPENCENTER_LOG_LEVELLog verbosity: debug, info, warn, errorwarn
EDITOREditor for opencenter cluster editvi
KIND_EXPERIMENTAL_PROVIDEROptional Kind runtime override for Podmanunset

OPENCENTER_LOG_LEVEL

Controls CLI log verbosity. Valid values: debug, info, warn, error.

Precedence (highest wins):

  1. --log-level flag
  2. OPENCENTER_LOG_LEVEL environment variable
  3. Default: warn

The CLI checks whether --log-level was explicitly set. If the flag is at its default value (warn), the CLI reads OPENCENTER_LOG_LEVEL from the environment. If the env var is set, that value is used. If neither the flag nor the env var is provided, the default warn applies.

# Use env var (no flag)
export OPENCENTER_LOG_LEVEL=debug
opencenter cluster list # runs at debug level

# Flag overrides env var
export OPENCENTER_LOG_LEVEL=debug
opencenter cluster list --log-level error # runs at error level

# Default when neither is set
unset OPENCENTER_LOG_LEVEL
opencenter cluster list # runs at warn level

Cluster Variables (set by opencenter cluster env)

VariableDescription
OPENCENTER_CLUSTERCurrently active cluster identifier
KUBECONFIGPath to cluster kubeconfig file
ANSIBLE_INVENTORYPath to Kubespray inventory file
PATHPrepended with cluster-specific bin/ directory

OpenStack Provider Variables

VariableDescription
OS_AUTH_URLKeystone authentication URL
OS_PROJECT_NAMEOpenStack project name
OS_USERNAMEOpenStack username
OS_PASSWORDOpenStack password
OS_REGION_NAMEOpenStack region
OS_USER_DOMAIN_NAMEUser domain
OS_PROJECT_DOMAIN_NAMEProject domain

VMware Variables

VariableDescription
VSPHERE_SERVERvCenter server address
VSPHERE_USERvCenter username
VSPHERE_PASSWORDvCenter password

These are relevant to VMware integrations such as vSphere CSI and related credential flows.

Kind Runtime Variable

KIND_EXPERIMENTAL_PROVIDER

Selects a non-default local runtime for Kind, typically Podman:

export KIND_EXPERIMENTAL_PROVIDER=podman
opencenter cluster bootstrap dev-cluster

AWS Service Integration Variables

AWS remains relevant for service integrations, but not as a GA infrastructure provider.

VariableDescription
AWS_ACCESS_KEY_IDAWS access key
AWS_SECRET_ACCESS_KEYAWS secret key
AWS_DEFAULT_REGIONAWS region

Air-Gap Variables (config/versions.env)

VariableDescription
KUBERNETES_VERSIONTarget Kubernetes version
KUBESPRAY_VERSIONKubespray branch or tag
CONTAINERD_VERSIONContainerD version
CALICO_VERSIONCalico CNI version
OPENCENTER_GITOPS_BASE_REPOGit URL for gitops-base
OPENCENTER_GITOPS_BASE_VERSIONBranch or tag for gitops-base
TARGET_ARCHTarget architecture (amd64, arm64)

Shell Integration

# Bash/Zsh
eval "$(opencenter cluster env my-cluster)"

# Fish
opencenter cluster env my-cluster --shell fish | source

# PowerShell
opencenter cluster env my-cluster --shell powershell | Invoke-Expression