Ensure that public access to the Kubernetes API is disabled for your OCI Kubernetes Engine (OKE) clusters so that the access is made through a private endpoint. In OKE, a private endpoint is represented as a private IP address within a subnet in your VCN. This significantly reduces the cluster's attack surface by preventing direct access from the public internet, which is critical for security and compliance.
In a private cluster, the control plane often utilizes both a private endpoint for internal node communication within the Virtual Cloud Network (VCN) and an optional public endpoint for external API access. While authentication is enforced, exposing the public endpoint allows attackers to perform reconnaissance, such as identifying the Kubernetes API version, which can reveal potential vulnerabilities. Therefore, disabling the public endpoint to the Kubernetes API when not strictly needed is a critical security measure to reduce the attack surface and prevent unauthorized external exposure.
Audit
To determine if public access to the Kubernetes API is disabled for your OKE clusters, perform the following operations:
Remediation / Resolution
To ensure that public access to the Kubernetes API is disabled for your OCI Kubernetes Engine (OKE) clusters, perform the following operations:
References
- Oracle Cloud Infrastructure Documentation
- Overview of Kubernetes Engine (OKE)
- Managing Kubernetes Clusters
- Public and Private Clusters
- Oracle Cloud Infrastructure CLI Documentation
- compartment list
- cluster list
- cluster get
- cluster update-endpoint-config