I need to add a new cluster for a multi cluster de...
# kubernetes
I need to add a new cluster for a multi cluster deployment. As I'm still learning K8s • Do I just loop the provider and run 2 iterations to deploy through all? Doesn't make sense to me to consider it as a new stack. • OR is there an EASY way to do both so that a "light weight" blue green consistency is achieved like a normal pulumi create/replace and do both clusters as "one". (I guess that's sorta like a multiplexer for providers?). Key is want to keep it simple. Right now everyone else is just using kubectl so any improvement on that approach on multi-cluster would be good. (Agent deploying has access to reach all clusters) ◦ I wasn't certain if idiomatic design patterns for kubernetes expect cluster app versions to be matching or it's normal on issues to have them get out of sync etc.
👀 1
👉  bump! Even if just a quick answer, wondering about multi-region (2 clusters at least) deployments and if I just should add a list of clusters to iterate through or something else?  Not finding a lot of clear reading on this.
I think it’s really up to you how you want to structure it. I’m not quite sure what you mean about blue/green relative to your original question
Pulumi does blue -> green "light" by create before delete and health checks and all come online
So it's working well without dealing with full copies of the entire app.
Now, I have been told
clusters (multi-region right now) need my deployment. I am not sure if I just loop through a list of clusters and deploy each, or if there is a better practice with pulumi. I was trying to figure out if say 1 cluster failed to get my updated deployment and then the other worked, a loop would just let them be on different versions (not sure that's normal). Trying to figure out if I need some way of saying all deployments = success, NOT just one cluster being ok but the other being a failure.
Still learning k8s, so not sure what is an idiomatic pattern for k8s with deployments like this. I'm assuming right now most folks are just taking deployment yaml and kubectl apply on both clusters and no real logic of "make sure all succeeded".
I think this is more up to you and less about Pulumi, which is what level of granularity do you wnt to do things and ensure success, handle rollbacks, etc. Pulumi can be the tool that will help you achieve the desired state, but for something like what you’re describing, you need some higher level orchestration to reason about it.
Ok, assuming the current solution is just raw kubectl yaml to each in loop, I'm assuming I'll just add a list of clusters to my stack and have it loop entire stack through each. The alternative I can think of is that I'd need to use components more and make my stack actually deploy the resources to different provides as two unique parts of the stack instead of a loop, which seems overcomplicated and annoying.