Kubernetes API server exposed to the internet
The Kubernetes API server is the control plane. If its endpoint is reachable from the whole internet, every authentication weakness and known CVE in it becomes internet-facing.
Why it matters
Exposed API servers are scanned for anonymous access, weak tokens and known RCEs; a foothold on the API is a foothold on every workload.
Managed clusters (EKS/GKE/AKS) default to a public endpoint unless you restrict it, so this is common.
How to check for it
- Check the cluster endpoint: for EKS, aws eks describe-cluster --name <c> --query cluster.resourcesVpcConfig.(endpointPublicAccess,publicAccessCidrs).
- For any cluster, confirm whether the API server IP is reachable from outside your networks and whether anonymous auth is disabled.
How to fix it
- Restrict public access to known CIDRs, or switch to a private endpoint and reach it over a VPN / bastion.
- Disable anonymous auth and require strong, short-lived credentials (OIDC / IAM) for the API.
SkyShield checks this automatically
Connect your AWS, Cloudflare, GitHub, GitLab, Hetzner or DigitalOcean account read-only and SkyShield flags this across every account and region, with the fix in plain words — alongside the agent that watches your servers. Start free.
FAQ
- Does a private endpoint break kubectl for my team?
- No — your team reaches it over the VPN or a bastion / jump host. CI runners connect from inside the network or through a proxy.