Score:-1

What is the difference between rollout restart pod and delete pod?

in flag

What is the difference between rollout restart pod and delete pod in k8s? Are they both restarting the pod?

Score:0
bn flag

For other folks who end up here, kubectl rollout does not apply to pods. Per the command line help (kubectl rollout -h):

 Valid resource types include:

  *  deployments
  *  daemonsets
  *  statefulsets

As I write this, if you try to run a rollout restart on a pod, you will likely get an error message like this:

$ kubectl rollout restart pod test-zrdcs
error: pods "test-zrdcs" restarting is not supported

For pod resources, a delete will do what it says on the tin and attempt to delete the pod. If the pod is managed by a higher level resource (e.g. replica set or deployment) then that object may replace the deleted pod.

This is the version of kubectl I'm using right now:

$ kubectl version --client --short
Client Version: v1.25.4
Score:0
tc flag

In Kubernetes, the rollout restart and delete commands are used to restart or delete pods, respectively. However, they work in different ways and have different effects on the pods and the overall system.

The rollout restart command is used to restart a deployment or a replica set in Kubernetes. This means that it will replace the existing pods in the deployment or replica set with new ones, which will have the latest version of the application code and any updated configuration. This is useful for deploying updates to an application or for restarting a deployment that is not functioning properly.

On the other hand, the delete command is used to delete a pod directly, without affecting the deployment or replica set. This will remove the pod from the system and free up the resources it was using. This is useful for removing pods that are no longer needed or for troubleshooting issues with individual pods.

Overall, both the rollout restart and delete commands can be used to restart pods in Kubernetes, but they work in different ways and have different effects on the system. The rollout restart command is used to restart an entire deployment or replica set, while the delete command is used to delete individual pods.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.