https://pulumi.com logo
Title
f

fancy-egg-38667

01/12/2022, 12:13 AM
In Pulumi, I want to target a specific Kubernetes cluster in my kubectx. I have three envs: • local ( local docker ) • dev • stg How do I explicitly target these k8s clusters in code? I am in GoLang.
s

square-car-84996

01/12/2022, 12:21 AM
You pass the specific kubernetes provider to the resources in the
opts
on each resource
b

billowy-army-68599

01/12/2022, 12:52 AM
there's 2 options: • use an explicit provider like Curtis said, and pass it to the resource. Here's an example: https://github.com/pulumi/examples/blob/947273e7a62cf31649559344b2dd8df78bddacd9/gcp-go-gke/main.go#L50 • set it as a stack configuration and then create a stack per env