https://pulumi.com logo
#typescript
Title
# typescript
b

big-hair-80287

07/27/2019, 11:52 PM
Hey there. I'm trying to understand how to get Pulumi to create a namespace when I'm applying a Kubernetes chart. I have the following image but I need the namespace to be created before the chart is deployed (since it is deployed in the namespace). I can't seem to find any examples of how to do this online.
I'm not sure if I am doing this right, so clarification would be preferable. All I did was the following.
Copy code
new k8s.core.v1.Namespace(...)

new helm.v2.Chart(...)
I did not add any references to the namespace, other than the name of the namespace, to the chart. No variables where shared. I was given this plan.
w

white-balloon-205

07/29/2019, 4:12 PM
That plan looks expected given the code. If you want the chart to deploy into the namespace, you would need to pass
values: { ... }
and include the namespace name in the chart. You can see examples of this here: https://github.com/pulumi/examples/blob/735a7116f0dcfed83ddaee986cc2c9ac96fec894/aws-ts-eks-hello-world/index.ts If there is no real dependency, but you still want these to be sceduled one after the other - you can use
dependsOn: namespace
in the
Chart
.
👍 1