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):
- CLI flags (e.g.,
--log-level) - Environment variables
- Cluster config file
- CLI settings file
- Built-in defaults
CLI Variables
| Variable | Description | Default |
|---|---|---|
OPENCENTER_CONFIG_DIR | Root configuration directory | ~/.config/opencenter |
OPENCENTER_CLUSTERS_DIR | Cluster storage directory | ${OPENCENTER_CONFIG_DIR}/clusters |
OPENCENTER_STATE_DIR | State directory (bootstrap, audit, locks) | ~/.local/state/opencenter |
OPENCENTER_PLUGINS_DIR | Plugins directory | ${OPENCENTER_CONFIG_DIR}/plugins |
OPENCENTER_LOG_LEVEL | Log verbosity: debug, info, warn, error | info |
OPENCENTER_CLUSTER | Active cluster name | Set by opencenter cluster use |
OPENCENTER_ORG | Default organization | None |
OPENCENTER_GITOPS_DIR | GitOps repos output directory | ${OPENCENTER_CLUSTERS_DIR}/gitops |
OPENCENTER_SECRETS_DIR | Secrets storage directory | ${OPENCENTER_CLUSTERS_DIR}/secrets |
OPENCENTER_SESSION_FILE | Shell session tracking file | None |
EDITOR | Editor for opencenter cluster edit | vi |
KIND_EXPERIMENTAL_PROVIDER | Optional Kind runtime override (e.g., podman) | unset |
OPENCENTER_LOG_LEVEL
Controls CLI log verbosity. Valid values: debug, info, warn, error.
Precedence (highest wins):
--log-levelflagOPENCENTER_LOG_LEVELenvironment variable- 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)
| Variable | Description |
|---|---|
OPENCENTER_CLUSTER | Currently active cluster identifier |
KUBECONFIG | Path to cluster kubeconfig file |
ANSIBLE_INVENTORY | Path to Kubespray inventory file |
PATH | Prepended with cluster-specific bin/ directory |
Secrets Variables
| Variable | Description |
|---|---|
SOPS_AGE_KEY_FILE | Path to the Age private key file for SOPS decryption |
SOPS_AGE_KEY | Age private key value (alternative to file) |
OpenStack Provider Variables
| Variable | Description |
|---|---|
OS_AUTH_URL | Keystone authentication URL |
OS_PROJECT_NAME | OpenStack project name |
OS_USERNAME | OpenStack username |
OS_PASSWORD | OpenStack password |
OS_REGION_NAME | OpenStack region |
OS_USER_DOMAIN_NAME | User domain |
OS_PROJECT_DOMAIN_NAME | Project domain |
OS_CLOUD | OpenStack cloud profile (from clouds.yaml) |
VMware Variables
| Variable | Description |
|---|---|
VSPHERE_SERVER | vCenter server address |
VSPHERE_USER | vCenter username |
VSPHERE_PASSWORD | vCenter password |
These are relevant to VMware integrations such as vSphere CSI and related credential flows.
AWS Variables (Service Integrations)
| Variable | Description |
|---|---|
AWS_ACCESS_KEY_ID | AWS access key (for S3, Route53 integrations) |
AWS_SECRET_ACCESS_KEY | AWS secret key |
AWS_REGION | AWS 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)
| Variable | Description |
|---|---|
KUBERNETES_VERSION | Target Kubernetes version |
KUBESPRAY_VERSION | Kubespray branch or tag |
CONTAINERD_VERSION | ContainerD version |
CALICO_VERSION | Calico CNI version |
OPENCENTER_GITOPS_BASE_REPO | Git URL for gitops-base |
OPENCENTER_GITOPS_BASE_VERSION | Branch or tag for gitops-base |
TARGET_ARCH | Target 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