StatefulSet domain management

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version:
Cloud being used: (put bare-metal if not on a public cloud)
Installation method:
Host OS:
CNI and version:
CRI and version:

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.

In the documentation of StatefulSet I read that I need to create a headless service to manage the domain. However, I don’t understand what domain management entails exactly, and what my service needs to do to manage the domain.

In the given example, the service used to manage the domain is an nginx service, but I can’t figure out what it does exactly.

What documentation are you reading?
Does it say why you need a headless service?
Is this so that the pods are discoverable? By what?

this is a good post about the how’s and why’s of headless services.
Basically you needs a headless service for a collection of pods you want to connect to , but not via a load balancer. For example a grpc service, or kafka brokers, or the members of an etcd cluster.

What is your statefulset for?

David