title: How to expose an "election-based master and secondaries" service outside Kubernetes cluster?
body: <p>I've been trying to implement a service inside Kubernetes where each Pod needs to be accessible from outside the Cluster.</p>
  
  <p>The topology of my service is simple: 3 members, one of them acting as master at any time (election based); writes go to primary; reads go to secondaries. This is MongoDB replica set by the way.</p>
  
  <p>They work with no issues <em>inside</em> the Kubernetes cluster, but from <em>outside</em> the only thing I have is a <code>NodePort</code> service type that load balances incoming connections to one of them, but I need to access each on of them, separately, depending on what I want to do from my client (write or read).</p>
  
  <p>What kind of Kubernetes resource should I use to give individual access to each one of the members of my service?</p>