Set API endpoint access
Choose whether the cluster's API endpoint answers on its public address, inside the network, or both, and which networks may reach the public address.
Replace my-cluster with your cluster's name or id. Every request to the endpoint still has to authenticate. The cluster's own nodes always reach the endpoint over the network, whatever you set.
Prerequisites
- Permission for
eks:UpdateClusterConfigon the cluster. - In the console, also
eks:DescribeClusterto open the cluster.
Change endpoint access
- Open Kubernetes, open the cluster, then choose Networking.
- Under API endpoint access, turn Public on or off.
- With public access on, for Allowed networks (IPv4 CIDRs, one per line), enter the networks that may reach the public address.
- Turn Private on or off.
- Choose Save endpoint access.
The console says "Saved. The control plane applies it within a minute."
dcloud eks clusters update my-cluster \
--allowed-cidrs 203.0.113.0/24 --allowed-cidrs 198.51.100.7/32Private access only: dcloud eks clusters update my-cluster --no-endpoint-public-access.
PATCH /eks/api/clusters/my-cluster
{ "allowedCidrs": ["203.0.113.0/24"], "endpointPublicAccess": true, "endpointPrivateAccess": true }resource "dcloud_eks_cluster" "main" {
name = "my-cluster"
allowed_cidrs = ["203.0.113.0/24"]
endpoint_public_access = true
endpoint_private_access = true
}Result
The answer is the cluster with the new settings, and Activity records the change. At most 20 CIDRs are allowed.
With the public endpoint off, dcloud eks update-kubeconfig writes the endpoint's address in the
network, and Deutsche Cloud's outside availability probes stop (see
Availability and the SLA). While the public endpoint is on, the probes'
addresses are let through whatever the allowed networks say; they only request /readyz.
Refusals
400when both would be off: "The endpoint needs public access, private access or both: with neither, nobody could reach it" when the request turns both off, or "The endpoint needs public access, private access or both" when it turns off the one still on. The console refuses before sending.