kubectl rollout restart deployment #872
Unanswered
vdesplanque
asked this question in
Q&A
Replies: 2 comments
-
The https://github.com/kubernetes/kubectl/blob/master/pkg/cmd/rollout/rollout_restart.go Note the section here: if obj.Spec.Paused {
return nil, errors.New("can't restart paused deployment (run rollout resume first)")
} Is it possible your Deployment is paused also? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your answer.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I didn't find a built-in way in the client to execute a "rollout restart" of a deployment.
I figured out (by using --v=9 at the end of my command) that the request that kubernetes send internally is :
I tried to use "PatchNamespacedDeploymentAsync", with no luck.
Here is the code I use :
"patchedDeployment", that I retrieve by doing again a ReadNamespacedDeploymentAsync contains my updated Metadata.Annotations "kubectl.kubernetes.io/restartedAt" with the expected value, but the related pods are not restarted.
The pods are restarted almost instantly when I run "kubectl rollout restart deployment -n namespace --v=9"
What do I miss ?
Beta Was this translation helpful? Give feedback.
All reactions