Docker & Cluster Networking

Docker Networking

docker network ls

Cluster Networking

  • ETCD: 2379 port

  • kube-api: 6443 port

  • kubelet: 10250 port

  • kube-scheduler: 10251 port

  • kube-controller-manager: 10252 port

  • services: 30000-32767 port

Commands

  • ip link
  • ip addr
  • ip addr add 192.xx.xx/x dev eth0
  • ip route
  • ip route add xx.xx.xx via xx.xx.xx
  • cat /proc/sys/net/ipv4/ip_forward
  • arp
  • netstat -plnt
  • route

Lab Learning

  • ip a | grep -B2 <node-ip-address>
  • Get Mac Address

    ip link show eth0
  • Check ip corersponding with network interface, select that

    ip address
  • Shows all bridges on the host

    ip address show type bridge
  • netstat -nlp | grep i <name>

Pod Networking

  1. Kubelet

  2. Checks location of the script

--cni-conf-dir=/etc/cni/net.d
  1. Finds the script

--cni-bin-dir=/opt/cni/bin
  1. Executes the snippet

./net-script.sh add<container> <namespace>

Last updated