Suppose I want to create a k8s cluster on bare metal servers, with 1 master and 2 nodes. What ports do I have to open in my firewall so that the master and nodes can communicate over the Internet? (I know I can just use VPN, but I just want to know which ports I need). I guess I need at least the following ports. Do I need more? How about if I'm using Flannel or Calico? I want to create a comprehensive list of all possible k8s services and needed ports. Thank you.
kubectl - 8080
ui - 80 or 443 or 9090
etcd - 2379, 2380
Kubernetes Services support TCP (default), UDP, and SCTP protocols. One of the most popular ways to use Kubernetes Services in AWS is with the LoadBalancer type.
Port exposes the Kubernetes service on the specified port within the cluster. Other pods within the cluster can communicate with this server on the specified port. TargetPort is the port on which the service will send requests to, that your pod will be listening on.
The service name sun-sr-https is the name of the Oracle Service Registry which (according to this) uses the 6443 port for HTTPS over SSL connections as an alternative to the default well-known port 443 so as not to cause conflicts with the default Application Server domain.
Each node in your cluster must have at least 300 MiB of memory.
I have exposed a service on an external port on all nodes in a kubernetes cluster from: You have exposed your service on an external port on all nodes in your cluster. If you want to expose this service to the external internet, you may need to set up firewall rules for the service port (s) (tcp:30002) to serve traffic.
Also nodes should be able to receive traffic from other nodes and from the master on pretty much any port, on the network fabric used for Kubernetes pods (flannel, weave, calico, ...) If you expose applications using a NodePort service or Ingress resource, the corresponding ports should also be open on your nodes.
It’s important to understand that NodePort Services build on top of ClusterIP Services. However, when you define a NodePort Service, Kubernetes takes care of creating any ClusterIPs and mapping ports etc. Last but not least, Kubernetes offers a LoadBalancer Service.
We recommend limit 2GB for typical installation of managed cluster which has 8 working, 40 pods per node with total 320 nodes. Retention period for Prometheus agent is 1 hour. Single master Kubernetes cluster, at one-two worker nodes, use all Kublr’s features (two for basic reliability)
the ports for kubernetes are the following:
from the CoreOS docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With