https://pulumi.com logo
#general
Title
# general
e

early-intern-90238

10/24/2019, 12:32 AM
Is there a way to do a kubectl rollout restart?
I guess this goes all the way back to this issue: https://github.com/pulumi/pulumi-kubernetes/issues/383 which was never resolved.
This is a huge pain in the butt with microstacks...but I am not sure its Pulumi's fault. But it would be super cool if Pulumi Kubernetes would let me execute kubectl commands off the provider...
t

tall-rose-87315

10/24/2019, 1:12 AM
💯
c

creamy-potato-29402

10/24/2019, 1:20 AM
We occasionally think about this. The problem is that it exist pretty far outside of our declarative model.
e

early-intern-90238

10/24/2019, 2:30 AM
Yeah I don't disagree with that, but from a perspective of using Pulumi it's a pretty significant gap in the pipeline.
g

gorgeous-egg-16927

10/24/2019, 2:40 AM
You could always shell out to
kubectl
from your pulumi program. https://github.com/pulumi/pulumi-kubernetes/blob/0a18b87fd1b4fa5778542dbb0e82a08a2e91ab88/sdk/nodejs/helm/v2/helm.ts#L388-L413 is an example of us doing that for
helm
e

early-intern-90238

10/24/2019, 2:45 AM
whut
very interesting....
c

cool-egg-852

10/24/2019, 3:18 PM
I was curious about this as well, but thinking about it, why would pulumi perform the restart? How would you code pulumi to execute the restart, and only that specific time, not a secondary time? The thing I hate about the restart feature is that it does so by adding an annotation. This was a hack from kubernetes IMO.
t

tall-rose-87315

10/24/2019, 4:17 PM
just ran into this interesting example (it executes az cli): https://github.com/pulumi/examples/blob/master/azure-ts-static-website/staticWebsite.ts should be able to use kubectl the same way
3 Views