Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Needed ports for Kubernetes cluster

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

like image 551
Erwin Avatar asked Sep 02 '16 13:09

Erwin


People also ask

Does Kubernetes use TCP or UDP?

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.

How ports work in Kubernetes?

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.

What is the purpose of port 6443?

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.

How much RAM does a Kubernetes cluster need?

Each node in your cluster must have at least 300 MiB of memory.

How do I expose a Kubernetes Service on an external port?

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.

What should nodes be able to do in Kubernetes?

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.

What is the difference between Kubernetes nodeport and clusterip?

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.

How many Kubernetes pods can be installed on a single cluster?

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)


1 Answers

the ports for kubernetes are the following:

enter image description here

from the CoreOS docs.

like image 120
Dubs Avatar answered Sep 29 '22 10:09

Dubs