<p>I did read up on StatefulSets which I want to use for some stateful applications, and was wondering about two things?</p>

<p>1) Do I need to put a service in front? Or do I just dns query the single instances, and they do have a static ip like with a service by default, disregarding what pod runs behind?</p>

<p>2) How does a statefulset behave when a given pod X is down? I suppose with my theory of it having a kind of "internal" service, it will just hold back any requests done while the pod behind the IP is down until a new one is there?</p>

Sossenbinder
<blockquote>
  <p>1) Do I need to put a service in front? Or do I just dns query the
  single instances, and they do have a static ip like with a service by
  default, disregarding what pod runs behind?</p>
</blockquote>

<p>StatefulSets currently require a Headless Service to be responsible for the network identity of the Pods. You are responsible for creating this Service.</p>

<blockquote>
  <p>2) How does a statefulset behave when a given pod X is down? I suppose
  with my theory of it having a kind of "internal" service, it will just
  hold back any requests done while the pod behind the IP is down until
  a new one is there?</p>
</blockquote>

<p>StatefulSet ensures that, at any time, there is at most one Pod with a given identity running in a cluster. This is referred to as at most one semantics provided by a StatefulSet.The StatefulSet also recreates Pods if they’re deleted, similar to what a ReplicaSet does for stateless Pods.</p>
