<p>As per the Headless service definition:</p>
<blockquote>
<p>Kubernetes allows clients to discover pod IPs through DNS lookups. Usually, when you perform a DNS lookup for a service, the DNS server returns a single IP which is the service’s cluster IP. But if you don’t need the cluster IP for your service, you can set ClusterIP to None , then the DNS server will return the individual pod IPs instead of the service IP.Then client can connect to any of them</p>
</blockquote>
<p>Looks like its similar to creating a clusterIP with one backend pod. If so why should we use clusterIP with one backend pod?</p>

Deepan
<p>You don't usually control the Pod's name, and you can't guarantee that there will <em>always</em> be <em>exactly</em> one matching Pod.</p>
<p>There are a couple of standard reasons to not directly create Pods, but instead to rely on higher-level constructs.  A Deployment can do zero-downtime upgrades; a StatefulSet manages associated PersistentVolumeClaims; a Job can retry on failure.  A Pod also can't be edited once created, so you'd need to delete and recreate the Pod on any update.  If you're using a Deployment you'll have Pod names like <code>deployment-name-12345678-abcde</code>, but you don't control the ending parts at all.  A Service will give you a consistent name.</p>
<p>During an upgrade there won't necessarily be exactly the requested number of <code>replicas:</code>.  A Deployment by default will create an additional Pod, wait for it to pass its readiness checks, then tear down the old Pod; an associated Service will route traffic correctly in this case.  The alternative is to tear down the old Pod first.  In both cases, you could have zero or two matching Pods and not just one.</p>
<p>Having the Service as the standard pattern also helps if you do ever decide to increase the replica count; for example you might choose to run multiple replicas just for additional resiliency in case ons of the Nodes fails.  Communicating via a Service works exactly the same way whether you have just one Pod or several.</p>
