How to expose a headless service for a StatefulSet externally in Kubernetes

后端 未结 6 1259
甜味超标
甜味超标 2020-12-12 16:03

Using kubernetes-kafka as a starting point with minikube.

This uses a StatefulSet and a headless service for service discovery within the cluster.

The goal i

6条回答
  •  星月不相逢
    2020-12-12 16:51

    I solved this problem by creating separate statefulset for each broker and separate service of type NodePort for each broker. Internal communication can happen on each individual service name. External communication can happen on NodePort address.

提交回复
热议问题