<p>I am very new to k8s so apologies if the question doesn't make sense or is incorrect/stupid. </p>

<p>I have a liveness probe configured for my pod definition which just hits a health API and checks it's response status to test for the liveness of the pod.</p>

<p>My question is, while I understand the purpose of the liveness/readiness probes...what exactly are they? Are they just another type of pods which are spun up to try and communicate with our pod via the configured API? Or are they some kind of a lightweight process which runs inside the pod itself and attempts the API call?</p>

<p>Also, how does a probe communicate with a pod? Do we require a service to be configured for the pod so that the probe is able to access the API or is it an internal process with no additional config required?</p>

<p><strong>Short answer:</strong> <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/" rel="nofollow noreferrer">kubelet</a> handle this checks to ensure your service is running, and if not it will be replaced by another container. Kubelet runs in every node of your cluster, you don't need to make any addional configurations.</p>

<p>You <strong>don't need</strong> to configure a service account to have the probes working, it is a internal process handled by kubernetes.</p>

<p>From Kubernetes <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes" rel="nofollow noreferrer">documentation</a>:</p>

<blockquote>
  <p>A  <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#probe-v1-core" rel="nofollow noreferrer">Probe</a>  is a diagnostic performed periodically by the  <a href="https://kubernetes.io/docs/admin/kubelet/" rel="nofollow noreferrer">kubelet</a>  on a Container. To perform a diagnostic, the kubelet calls a  <a href="https://godoc.org/k8s.io/kubernetes/pkg/api/v1#Handler" rel="nofollow noreferrer">Handler</a>  implemented by the Container. There are three types of handlers:</p>
  
  <ul>
  <li><p><a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#execaction-v1-core" rel="nofollow noreferrer">ExecAction</a>: Executes a specified command inside the Container. The diagnostic is considered successful if the command exits with a status code of 0.</p></li>
  <li><p><a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#tcpsocketaction-v1-core" rel="nofollow noreferrer">TCPSocketAction</a>: Performs a TCP check against the Container’s IP address on a specified port. The diagnostic is considered successful if the port is open.</p></li>
  <li><p><a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#httpgetaction-v1-core" rel="nofollow noreferrer">HTTPGetAction</a>: Performs an HTTP Get request against the Container’s IP address on a specified port and path. The diagnostic is considered successful if the response has a status code greater than or equal to 200 and less than 400.</p></li>
  </ul>
  
  <p>Each probe has one of three results:</p>
  
  <ul>
  <li>Success: The Container passed the diagnostic.</li>
  <li>Failure: The Container failed the diagnostic.</li>
  <li>Unknown: The diagnostic failed, so no action should be taken.</li>
  </ul>
  
  <p>The kubelet can optionally perform and react to three kinds of probes on running Containers:</p>
  
  <ul>
  <li><p><code>livenessProbe</code>: Indicates whether the Container is running. If the liveness probe fails, the kubelet kills the Container, and the Container is subjected to its  <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy" rel="nofollow noreferrer">restart policy</a>. If a Container does not provide a liveness probe, the default state is  <code>Success</code>.</p></li>
  <li><p><code>readinessProbe</code>: Indicates whether the Container is ready to service requests. If the readiness probe fails, the endpoints controller removes the Pod’s IP address from the endpoints of all Services that match the Pod. The default state of readiness before the initial delay is  <code>Failure</code>. If a Container does not provide a readiness probe, the default state is  <code>Success</code>.</p></li>
  <li><p><code>startupProbe</code>: Indicates whether the application within the Container is started. All other probes are disabled if a startup probe is provided, until it succeeds. If the startup probe fails, the kubelet kills the Container, and the Container is subjected to its  <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy" rel="nofollow noreferrer">restart policy</a>. If a Container does not provide a startup probe, the default state is  <code>Success</code>.</p></li>
  </ul>
</blockquote>
