Access Modes

OKE clusters can be configured with two different access modes for the Kubernetes API. Choose the most relevant, based on your security requirements:

Access Mode provision_bastion endpoint_public_accessUse Case
Public EndpointfalsetrueDevelopment/testing or when direct access is acceptable
Bastion TunneltruefalseProduction clusters with strict network isolation
Feature Bastion Tunnel Public Endpoint
Network exposurePrivate only (VCN)Public internet (IP-restricted)
kubernetes_api_hostRequired (tunnel URL)Auto-detected from kubeconfig
SSH tunnel requiredYesNo
Terraform commands Need -var="kubernetes_api_host=..."No extra variables needed
SecurityHigher (no public exposure)Medium (IP allowlist via control_plane_allowed_cidrs)

Important

The kubernetes_api_host variable should only be set when using bastion tunnel mode (provision_bastion=true). When using public endpoint mode (endpoint_public_access=true), do not set this variable; the Kubernetes and Helm providers will automatically discover the cluster's public endpoint from the OCI-generated kubeconfig.