Port 6443 is the Kubernetes API server, which kubectl, controllers and nodes use to manage the cluster. It should not be reachable from the public internet.
- Port
- 6443
- Protocol
- TCP
- Service
- Kubernetes API server
- Expose to internet?
- No
- Also used by
- kube-apiserver, k3s, RKE2, OpenShift
Is port 6443 safe to open?
The API server requires authentication, and many managed clusters expose it publicly by default. But it is the control plane for every workload: a leaked kubeconfig, an over-privileged service account or anonymous access with permissive RBAC gives an attacker the cluster. It also reveals the Kubernetes version to scanners.
How to secure Kubernetes API server
- Restrict access with authorised networks or a private endpoint on managed clusters.
- Disable anonymous authentication (
--anonymous-auth=false) or make sure RBAC grants it nothing. - Review RBAC so no binding gives
cluster-adminto broad groups likesystem:authenticated. - Keep the control plane on a supported Kubernetes version.
Check if port 6443 is open
Linux: what is listening on this port
sudo ss -tlpn | grep ':6443 'Windows (PowerShell): what is listening
Get-NetTCPConnection -LocalPort 6443 -State Listen | Select-Object LocalAddress, OwningProcess, @{n='Process';e={(Get-Process -Id $_.OwningProcess).Name}}From another machine: is it reachable
nc -zv HOST 6443
# or
nmap -p 6443 HOST
# Windows
Test-NetConnection HOST -Port 6443Test the Kubernetes API server service itself
curl -sk https://HOST:6443/versionRestrict port 6443 in the firewall
Replace 10.0.0.0/8 with the network or address that needs access. Docker publishes container ports through its own iptables rules, which bypass ufw; bind published ports to 127.0.0.1 (-p 127.0.0.1:6443:6443) instead of relying on the host firewall.
ufw: allow only your private network, deny everyone else
sudo ufw allow from 10.0.0.0/8 to any port 6443 proto tcp
sudo ufw deny 6443/tcpfirewalld: allow one source network only
sudo firewall-cmd --permanent --remove-port=6443/tcp
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.0/8" port port="6443" protocol="tcp" accept'
sudo firewall-cmd --reloadiptables
sudo iptables -A INPUT -p tcp --dport 6443 -s 10.0.0.0/8 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 6443 -j DROPWindows Firewall (PowerShell, as Administrator)
New-NetFirewallRule -DisplayName "Block 6443 from internet" -Direction Inbound -Protocol TCP -LocalPort 6443 -RemoteAddress Internet -Action BlockMonitor port 6443
Run a TCP port monitor against your public IP on port 6443: here, a failed connection is the healthy result, so you know the firewall is still doing its job. On Linux, the Statance agent also reports every listening port on the server. TCP port monitoring.
Related ports
| Port 10250 | Kubernetes kubelet API | Critical risk |
| Port 2379 | etcd (client API) | Critical risk |
| Port 2375 | Docker Engine API (unencrypted) | Critical risk |
FAQ
What is port 6443 used for?
Port 6443 is the Kubernetes API server, which kubectl, controllers and nodes use to manage the cluster. It is also used by kube-apiserver, k3s, RKE2, OpenShift.
Is it safe to open port 6443?
Not to the public internet. The API server requires authentication, and many managed clusters expose it publicly by default. But it is the control plane for every workload: a leaked kubeconfig, an over-privileged service account or anonymous access with permissive RBAC gives an attacker the cluster. It also reveals the Kubernetes version to scanners.
Is port 6443 TCP or UDP?
Kubernetes API server uses TCP on port 6443.
How do I check if port 6443 is open?
On the server, run sudo ss -tulpn | grep ':6443 ' (Linux) or Get-NetTCPConnection -LocalPort 6443 (Windows) to see what is listening. From another machine, run nc -zv HOST 6443 or Test-NetConnection HOST -Port 6443.
Know the moment a port stops answering.
TCP, HTTP, DNS and SSL checks from six regions, plus server metrics from a one-line agent.