Skip to main content

More Info:

Create clusters with a private control plane endpoint and disable public access, so the Kubernetes API is not reachable from outside the node network when not required.

Risk Level

Critical

Address

Security

Compliance Standards

  • CIS OKE

Triage and Remediation

Remediation

Manual Steps

  1. Identify the cluster and current endpoint configuration
    • On any machine with access to your Oracle tenancy and CLI configured, run:
    • Note for each cluster:
      • is-public-ip-enabled (public endpoint on/off)
      • is-private-endpoint-enabled (private endpoint on/off)
      • Any nsg-ids or subnet-id associated with the endpoint.
  2. Review access requirements and network design
    • With your platform/network/application owners, decide for each cluster:
      • Do administrators or CI/CD systems outside the VCN (or connected networks like VPN/DRG/peering) need direct API access?
      • Can all required API consumers run from within the VCN (bastion host, jumpbox, VPN, private peering, etc.)?
    • If all legitimate access can be provided from within private networks, plan to:
      • Enable private endpoint.
      • Disable public endpoint.
  3. Check for dependencies on the public API endpoint
    • On any machine with kubectl access to the cluster, inspect the current API server URL used by admins/automation:
    • Inventory all systems that use this endpoint (IDPs, CI/CD, monitoring, external operators, developer tools).
    • For each, decide if:
      • It can be moved inside the VCN / over VPN / over private peering, or
      • It strictly requires public access (in which case document and formally accept the risk as an exception).
  4. Plan and apply configuration changes in OCI
    • If you determine public access is not required for a cluster:
      • In the OCI Console:
        1. Go to “Developer Services” → “Kubernetes Clusters (OKE)” → select the cluster.
        2. Locate the “Endpoint” or “Cluster Access” section.
        3. Ensure a private endpoint is configured in an appropriate private subnet and NSGs.
        4. Disable the public endpoint / public access setting.
    • If using IaC (Terraform), review your code for the cluster resource, for example:
      • Ensure:
      • Apply the change with your standard pipeline (e.g., terraform plan / terraform apply) following your change-management process.
  5. Verify endpoint exposure after the change
    • On any machine with OCI CLI:
    • Confirm:
      • "isPrivateEndpointEnabled": true
      • "isPublicEndpointEnabled": false (or equivalent field for public IP).
    • From an external network not connected to the VCN, confirm that the previous public API endpoint is no longer reachable (e.g., TLS handshake or curl now fails / times out).
  6. Update access patterns and documentation
    • Ensure all administrators and automation now use the private API endpoint (update kubeconfig distributions, bastion/jumpbox access, VPN instructions).
    • Document:
      • The decision to disable public access (or the justified exception if you kept it).
      • The VCN/subnet/NSG design that provides required private access to the Kubernetes API.
kubectl cannot be used to enable a private control‑plane endpoint or disable public API access, because these settings are only configurable on the managed control plane via your cloud provider’s console, CLI, or IaC definitions. Please refer to the Manual Steps section for guidance on reviewing and updating the cluster’s control‑plane networking configuration.