Hi ! i have multiple stacks that are using the sam...
# kubernetes
a
Hi ! i have multiple stacks that are using the same k8s namespace. is there a good way to do a “get or create” namespace ? or do i to need create a stack with the namespace and then pull it in with “requireOutput” in all the other stacks ?
g
Unfortunately "get or create" is not a supported use case for the Kubernetes provider. An explanation is here - https://github.com/pulumi/pulumi/issues/3364#issuecomment-602902043. So your idea to create a stack with the namespace and then use StackReference is the best option. It's likely a better longterm option too as you won't have a "one off" stack that contains the namespace where others do not.
a
oki ! thanks !