Port 6443 (Kubernetes API)

Port 6443 is registered by IANA for the sun-sr-https service (Service Registry Default HTTPS Domain), but it is best known as the port of the Kubernetes…

Key facts

Port
6443
Protocols
TCP
Range
Registered port, 1024-49151
IANA service name
sun-sr-https
Unofficial use
The use described on this page is not the IANA assignment for this port. Source (opens in a new tab) Checked on 30.11.2026

IANA assigns ports in this range to services on request, under RFC 6335.

About port 6443

Port 6443 is registered by IANA for the sun-sr-https service (Service Registry Default HTTPS Domain), but it is best known as the port of the Kubernetes API server.

Common use (unofficial): according to the ports and protocols table in the Kubernetes documentation, the API server, the central component through which the cluster is managed, listens on TCP port 6443 on the control plane servers, and all cluster components, the kubectl tool and administrators connect to it. The connection is encrypted with HTTPS. The documentation notes that every default port can be changed, for example by moving the API server to port 443 or by placing a load balancer in front of it. This use is not the IANA assignment; it appears in the Kubernetes documentation.

What port 6443 is used for

  • kubectl: every kubectl command is sent to the API server on port 6443, at the address in the kubeconfig file.
  • Cluster components: the kubelet on every server, the scheduler and the controller manager all communicate with the API server.
  • CI/CD and management tools: deployment systems connect to the API to update applications in the cluster.

According to the same table, the control plane servers also use ports 2379 to 2380 for etcd and port 10250 for the kubelet, and the worker servers use the range 30000 to 32767 for NodePort services.

Port 6443 in the firewall

Port 6443 should be open to the cluster servers and to administrators, not to the whole internet:

  • UFW: ufw allow from 198.51.100.0/24 to any port 6443 proto tcp
  • firewalld: firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="198.51.100.0/24" port port="6443" protocol="tcp" accept'

When you restrict access to specific addresses, also delete any earlier rule that opened the port to everyone, or that general rule will keep allowing access from any address.

Open the etcd ports (2379 to 2380) and the kubelet port (10250) only between the cluster servers themselves.

Risks and security

The API server is the control point for the whole cluster, so protect it in several layers:

  • Restrict port 6443 to the addresses of the cluster servers, the administrators and the deployment systems.
  • Keep RBAC authorization enabled, and give each user and system only the permissions it needs.
  • Store kubeconfig files in a secure place, because they contain the credentials for the cluster.
  • Keep the cluster on supported versions, so you receive security fixes.

Commands to check and configure

  • kubectl cluster-info

    Shows the address of the cluster's API server, including the port, and checks that it can be reached.

  • kubectl get --raw='/readyz?verbose'

    Shows the API server's readiness checks and the status of each one.

  • curl -k 'https://localhost:6443/livez?verbose'

    Checks from the control plane server itself that the API server is alive. The -k option skips certificate verification, so use it only for a local check.

  • kubectl config view --minify

    Shows the settings of the current context in kubeconfig, including the server address and port.

  • ss -tlnp | grep ':6443 '

    Checks that the API server is listening on port 6443, and on which address (requires root privileges).

  • ufw allow from 198.51.100.0/24 to any port 6443 proto tcp

    Allows access to port 6443 only from the specified network (UFW).

  • firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="198.51.100.0/24" port port="6443" protocol="tcp" accept'

    Allows access to port 6443 in firewalld only from the specified network. Then run firewall-cmd --reload.

Port 6443 in the IANA registry

Port Protocol Service IANA registry description
6443 TCP sun-sr-https Service Registry Default HTTPS Domain
6443 UDP sun-sr-https Service Registry Default HTTPS Domain

Data source: IANA Service Name and Transport Protocol Port Number Registry (opens in a new tab)

Port 6443 FAQ

Why does kubectl say the connection to port 6443 was refused?

Check that the API server is running with ss -tlnp | grep ':6443 ' on the control plane server, that the address and port in the kubeconfig file are correct, and that the firewall allows the port from your computer. The kubectl config view --minify command shows which address kubectl is trying to connect to.

Can I run the API server on a different port?

Yes. According to the Kubernetes documentation, every default port can be changed, for example by moving the API server to port 443, or by keeping it on port 6443 and placing a load balancer that listens on port 443 in front of it. After the change, update the firewall and the kubeconfig files.

Which other ports does a Kubernetes cluster need?

Besides port 6443, the control plane servers use ports 2379 to 2380 for etcd, 10250 for the kubelet, and 10257 and 10259. The worker servers use port 10250, port 10256 for kube-proxy and the range 30000 to 32767 for NodePort services.

Where can I find useful kubectl commands?

The kubectl commands page collects the commands for managing pods, deployments, services and logs, with examples.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement