What are the main strategies for kubernetes updating pods?

Hi, I have a question relating to updating strategies. Currently, I have issues updating applications on our online systems. For the reason that, there could be a chance that there would be failure when updating a system, however, it drives all cluster not useable. So I just need help to see if there is a suitable strategy for clusters to update and put the system in a safe side. If possible, I want to update the system half and half, testing one working well and then update the rest pods.

Cluster information:

Kubernetes version:1.19.4

You can control pod deployments strategy (for deployment entities)(Deployments | Kubernetes) and use rolling update then tweak max available and maxsurge to control how many new pods should be ready before old pods are killed.

Of course if you are using a statefulset or daemonset you will have listed control over the pod deployment startegy

Hey @lhllhl2,

What exactly are you looking to update? Images?
Can you provide the result of the command below. Make sure to mask any info that could expose your infrastructure.

kubectl get events --sort-by=.metadata.creationTimestamp

thanks for your kind explain. I am currently using client java to do application update. And just found that there is an method called “updateK3sApp”. How to use rolling update then tweak max available and masurge to control pods?

Thanks for your kind explain. I just want to ask if there is a way to control pods with strategies mentioned above by using client java?