Which Kubernetes object must be used to be able to upgrade a pod without disrupting services?
Which Kubernetes object must be used to be able to upgrade a pod without disrupting services?
To upgrade a pod without disrupting services in Kubernetes, the Deployment object should be used. Deployments manage ReplicaSets that ensure a specified number of pod replicas are running at any given time. When performing a rolling update, the Deployment controller gradually updates pods with new versions to enable zero downtime. This allows upgrades to be performed while ensuring that some instances of the application remain operational to serve user requests.
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#creating-a-deployment
Rolling updates allow Deployments' update to take place with zero downtime by incrementally updating Pods instances with new ones. The new Pods will be scheduled on Nodes with available resources. https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/
I will go with A