This page looks best with JavaScript enabled

Kubernetes Base Environment Requirements

1. Base Packages

Kubernetes version ≥ 1.18
socatRequired
conntrackRequired
ebtablesOptional, but recommended
ipsetOptional, but recommended
ipvsadmOptional, but recommended
1
apt-get -y install socat conntrack ebtables ipset ipvsadm

2. Port Requirements

2.1 Base Node Services

ServiceProtocolActionStart PortEnd PortComment
sshTCPallow2222Node remote management
dockerTCPallow23752376Docker remote communication
etcdTCPallow23792380etcd cluster communication

2.2 Master/Control Plane Components

ServiceProtocolActionStart PortEnd PortComment
apiserverTCPallow64436443K8s API Server (HTTPS)
apiserver-insecureTCPallow80808080K8s API Server (HTTP, deprecated)
etcd-clientTCPallow23792379etcd client communication
etcd-peerTCPallow23802380etcd inter-node communication
schedulerTCPallow1025910259kube-scheduler
controller-managerTCPallow1025710257kube-controller-manager
kubeletTCPallow1025010250kubelet API
kubelet-readonlyTCPallow1025510255kubelet read-only port (deprecated)
kube-proxy-metricsTCPallow1024910249kube-proxy metrics

2.3 Worker Node Components

ServiceProtocolActionStart PortEnd PortComment
kubeletTCPallow1025010250kubelet API
kubelet-readonlyTCPallow1025510255kubelet read-only port (deprecated)
kube-proxyTCPallow1025610256kube-proxy health check
nodeportTCPallow3000032767NodePort service range

2.4 Network Components (CNI)

  • Calico
ServiceProtocolActionStart PortEnd PortComment
calico-typhaTCPallow54735473Calico Typha
calico-nodeTCPallow90999100Calico monitoring ports
bgpTCPallow179179Calico BGP
ipipIPENCAP/IPIPallowCalico IP-in-IP encapsulation
wireguardUDPallow5182051821Calico WireGuard (optional)
  • Flannel
ServiceProtocolActionStart PortEnd PortComment
flannel-vxlanUDPallow84728472Flannel VXLAN mode
flannel-host-gwTCPallow82858285Flannel host-gw mode
  • Cilium
ServiceProtocolActionStart PortEnd PortComment
cilium-agentTCPallow98769876Cilium Agent
cilium-operatorTCPallow92349234Cilium Operator
cilium-hubbleTCPallow42444244Hubble gRPC
  • Weave Net
ServiceProtocolActionStart PortEnd PortComment
weaveTCPallow67836783Weave network traffic
weaveUDPallow67836784Weave network traffic

2.5 Storage

  • NFS
ServiceProtocolActionStart PortEnd PortComment
rpcbindTCPallow111111NFS RPC bind
rpcbindUDPallow111111NFS RPC bind
nfsTCPallow20492049NFS service
nfsUDPallow20492049NFS service
  • iSCSI
ServiceProtocolActionStart PortEnd PortComment
iscsiTCPallow32603260iSCSI target port

2.6 Service Discovery and DNS

ServiceProtocolActionStart PortEnd PortComment
corednsTCPallow5353CoreDNS resolution
corednsUDPallow5353CoreDNS resolution
coredns-metricsTCPallow91539153CoreDNS metrics

2.7 Monitoring and Logging

  • Prometheus
ServiceProtocolActionStart PortEnd PortComment
prometheusTCPallow90909090Prometheus server
node-exporterTCPallow91009100Node Exporter
kube-state-metricsTCPallow80808081kube-state-metrics
  • Grafana
ServiceProtocolActionStart PortEnd PortComment
grafanaTCPallow30003000Grafana Web UI
  • ELK Stack
ServiceProtocolActionStart PortEnd PortComment
elasticsearchTCPallow92009300Elasticsearch
kibanaTCPallow56015601Kibana Web UI
logstashTCPallow50445044Logstash Beats
  • Jaeger
ServiceProtocolActionStart PortEnd PortComment
jaeger-queryTCPallow1668616686Jaeger UI
jaeger-collectorTCPallow1426814268Jaeger HTTP
jaeger-agentUDPallow68316832Jaeger UDP

2.8 Ingress

  • NGINX Ingress
ServiceProtocolActionStart PortEnd PortComment
nginx-httpTCPallow8080HTTP traffic
nginx-httpsTCPallow443443HTTPS traffic
nginx-metricsTCPallow1025410254NGINX metrics
  • Traefik
ServiceProtocolActionStart PortEnd PortComment
traefik-webTCPallow80808080Traefik Dashboard
traefik-httpTCPallow8080HTTP traffic
traefik-httpsTCPallow443443HTTPS traffic

2.9 Service Mesh

  • Istio
ServiceProtocolActionStart PortEnd PortComment
istiodTCPallow1501015017Istiod control plane
envoy-adminTCPallow1500015000Envoy admin port
envoy-outboundTCPallow1500115001Envoy outbound traffic
envoy-inboundTCPallow1500615006Envoy inbound traffic
istio-proxyTCPallow1502015020Istio Proxy status

2.10 Load Balancer

  • MetalLB
ServiceProtocolActionStart PortEnd PortComment
metallb-speakerTCPallow74727472MetalLB Speaker
metallb-webhookTCPallow94439443MetalLB Webhook

微信公众号
WRITTEN BY
微信公众号