kubernetes Client-go kubectl rollout example

11/11/2019

Could anyone get me a example about how to use

kubectl rollout pause xxx

kubectl rollout update xxx

in client-go? I can't find any example about it. Thank you~

-- edselwang
client-go
kubernetes

1 Answer

11/12/2019

As we can read in the Kubernetes docs Pausing and Resuming a Deployment.

You can pause a Deployment before triggering one or more updates and then resume it. This allows you to apply multiple fixes in between pausing and resuming without triggering unnecessary rollouts.

Updating a Deployment using Go-Client is easy because you are just updating the fields that you want to change, and once done commit them. So as long as you don't push the changes to the cluster you can still add new updates.

Here is a article on How to write Kubernetes custom controllers in Go and another one about Updating and rolling back a deployment.

-- Crou
Source: StackOverflow