6 Communication in a Kubernetes cluster

 

This chapter covers

  • How nodes communicate via CNI and the different CNIs available
  • Pod-to-Pod communication and traffic rules with Network Policy
  • 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 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, I think it will all start to come 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 Config files

6.2.2 Replicating DNS

6.2.3 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

6.8 Summary