<p>I'm a little confused, I've been ramping up on Kubernetes and I've been reading about all the different objects <code>ReplicaSet</code>, <code>Deployment</code>, <code>Service</code>, <code>Pods</code> etc.</p>
<p>In the documentation it mentions that the <code>kubelet</code> manages liveness and readiness checks which are defined in our <code>ReplicaSet</code> manifests.</p>
<p>Reference: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/</a></p>
<p>If this is the case does the <code>kubelet</code> also manage the replicas? Or does that stay with the controller?</p>
<p>Or do I have it all wrong and it's the <code>kubelet</code> that is creating and managing all these resources on a pod?</p>
<p>Thanks in advance.</p>

Paul
<p>Basically <code>kubelet</code> is called &quot;node agent&quot; that runs on each node. It get notified through kube apiserver, then it start the container through container runtime, it works in terms of Pod Spec. It ensures the containers described in the Pod Specs are running and healthy.</p>
<p>The flow of <code>kubelet</code> tasks is like: <code>kube apiserver</code> &lt;--&gt; <code>kubelet</code> &lt;--&gt; <code>CRI</code></p>
<p>To ensure whether the pod is running healthy it uses <code>liveness</code> probe, if it gets an error it restarts the pod.</p>
<p>kubelet does not maintain replicas, replicas are maintained by replicaset.  As k8s doc said: A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods.</p>
<p>See more of <a href="https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/" rel="nofollow noreferrer">ReplicaSet</a></p>
<p>For more info you can see: <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#:%7E:text=The%20kubelet%20is%20the%20primary,object%20that%20describes%20a%20pod." rel="nofollow noreferrer">kubelet</a></p>
