<p>I am trying to develop a AWS lambda to make a <code>rollout restart deployment</code> using the python client. I cannot find any implementation in the github repo or references. Using the -v in the <code>kubectl rollout restart</code> is not giving me enough hints to continue with the development.</p>
<p>Anyways, it is more related to the python client:</p>
<p><a href="https://github.com/kubernetes-client/python" rel="nofollow noreferrer">https://github.com/kubernetes-client/python</a></p>
<p>Any ideas? perhaps I could be missing something</p>

Vauluu
<p>The python client interacts directly with the Kubernetes API. Similar to what <code>kubectl</code> does. However, <code>kubectl</code> added some utility commands which contain logic that is not contained in the Kubernetes API. Rollout is one of those utilities.</p>
<p>In this case that means you have two approaches. You could reverse engineer the API calls the <a href="https://github.com/kubernetes/kubectl/blob/master/pkg/cmd/rollout/rollout_restart.go" rel="nofollow noreferrer">kubectl rollout restart</a> makes. Pro tip: With go, you can actually import internal Kubectl behaviour and libraries, making this quite easy. So consider writing your lambda in golang.</p>
<p>Alternatively, you can have your Lambda call the Kubectl binary (using the process exec libraries in python). However, this does mean you need to include the binary in your lambda in some way (either by uploading it with your lambda or by building a lambda layer containing <code>kubectl</code>).</p>
