Testing Peer Discovery
Explore how Kubernetes StatefulSets use headless Services to create DNS SRV records for pod peer discovery. Learn to deploy a test Pod, execute DNS queries with dig, and interpret results to verify that StatefulSet Pods are correctly registered and reachable within the cluster.
We'll cover the following...
We'll cover the following...
We know that pairing a headless Service with a StatefulSet creates DNS SRV records for each StatefulSet Pod that matches the Service’s label selector. We already have a headless Service and three StatefulSet Pods running, so we should have three DNS SRV records – one for each Pod.
How DNS hostnames subdomains work with StatefulSets
All Kubernetes objects get a name within the cluster address space. We can specify a custom address space when we build our ...