chapter six

6 Communication in a Kubernetes cluster

 

This chapter covers

  • How nodes communicate via a container network interface and the different container network interfaces available
  • Pod-to-pod communication and traffic rules with Network Policies
  • Types of Services in Kubernetes and when they are used
  • Assigning IP addresses to pods
  • Communication via DNS and how to use CoreDNS
  • Using ingress and ingress controllers
  • Understanding and implementing the new Gateway API mechanism

Many will find that networking in Kubernetes is complex, but we will break it down fully in this chapter, especially since it’s 20% of the Certified Kubernetes Administrator (CKA) exam. There are a few important concepts that will clear up a lot of confusion, and because we’ve covered how bridge networking works within containers, it should start coming together. By the end of this chapter, you’ll know how pods talk to each other within a cluster, which is the essence of the Services and networking section of the exam.

6.1 Configuring DNS

6.2 CoreDNS

6.2.1 Service CIDR

6.2.2 Config files

6.2.3 Replicating DNS

6.2.4 Pod-to-pod connectivity

6.3 Ingress and ingress controllers

6.4 Services

6.4.1 ClusterIP Service

6.4.2 NodePort Service

6.4.3 LoadBalancer Service

6.5 Cluster node networking configuration

6.6 Network Policies

6.7 Gateway API

Summary