https://pulumi.com logo
Title
a

adorable-action-51248

03/17/2021, 9:24 AM
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

gentle-diamond-70147

03/17/2021, 3:40 PM
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

adorable-action-51248

03/17/2021, 3:42 PM
oki ! thanks !