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 flags (e.g., --log-level)
  2. Environment variables
  3. Cluster config file
  4. CLI settings file
  5. Built-in defaults

CLI Variables​

VariableDescriptionDefault
OPENCENTER_CONFIG_DIRRoot configuration directory~/.config/opencenter
OPENCENTER_CLUSTERS_DIRCluster storage directory${OPENCENTER_CONFIG_DIR}/clusters
OPENCENTER_STATE_DIRState directory (bootstrap, audit, locks)~/.local/state/opencenter
OPENCENTER_PLUGINS_DIRPlugins directory${OPENCENTER_CONFIG_DIR}/plugins
OPENCENTER_LOG_LEVELLog verbosity: debug, info, warn, errorinfo
OPENCENTER_CLUSTERActive cluster nameSet by opencenter cluster use
OPENCENTER_ORGDefault organizationNone
OPENCENTER_GITOPS_DIRGitOps repos output directory${OPENCENTER_CLUSTERS_DIR}/gitops
OPENCENTER_SECRETS_DIRSecrets storage directory${OPENCENTER_CLUSTERS_DIR}/secrets
OPENCENTER_SESSION_FILEShell session tracking fileNone
EDITOREditor for opencenter cluster editvi
KIND_EXPERIMENTAL_PROVIDEROptional Kind runtime override (e.g., podman)unset

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: info
# 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 info 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

Secrets Variables​

VariableDescription
SOPS_AGE_KEY_FILEPath to the Age private key file for SOPS decryption
SOPS_AGE_KEYAge private key value (alternative to file)

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
OS_CLOUDOpenStack cloud profile (from clouds.yaml)

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.

AWS Variables (Service Integrations)​

VariableDescription
AWS_ACCESS_KEY_IDAWS access key (for S3, Route53 integrations)
AWS_SECRET_ACCESS_KEYAWS secret key
AWS_REGIONAWS region

AWS is used for service integrations (Terraform state in S3, Route53 DNS) — NOT as an infrastructure provider.

Kind Runtime Variable​

KIND_EXPERIMENTAL_PROVIDER​

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

export KIND_EXPERIMENTAL_PROVIDER=podman
opencenter cluster deploy dev-cluster

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