https://pulumi.com logo
e

early-musician-41645

02/01/2019, 11:23 PM
I'd like to bootstrap a cluster with a few namespaces. I've configured them, pulumi says they're created, but I verified they are not. What's wrong with this code?
Copy code
// Create some namespaces
for (let name of config.require("dev-namespaces").split(",")) {
  console.log(name);
  let ns = new k8s.core.v1.Namespace("mustang-"+name, {
    metadata: {
      name: name,
      labels: {
        name: name,
      },
    },
  }, {provider: cluster.provider});
}
Is there a better way to create a namespace?
c

creamy-potato-29402

02/01/2019, 11:24 PM
hmm that looks right.
kubectl
is pointed at that cluster, right?
e

early-musician-41645

02/01/2019, 11:25 PM
correct
c

creamy-potato-29402

02/01/2019, 11:25 PM
can you paste the output of the pulumi up
e

early-musician-41645

02/01/2019, 11:26 PM
the original one where they "created"?
lost that output
c

creamy-potato-29402

02/01/2019, 11:26 PM
hmm
whatโ€™s
pulumi refresh
say?
e

early-musician-41645

02/01/2019, 11:26 PM
hmmm... refresh says 'deleted'
c

creamy-potato-29402

02/01/2019, 11:27 PM
๐Ÿ˜
e

early-musician-41645

02/01/2019, 11:27 PM
followed by
pulumi up
it says they were re-created
c

creamy-potato-29402

02/01/2019, 11:27 PM
when you accept the refresh and run pulumi up what happens
ok are they there now?
e

early-musician-41645

02/01/2019, 11:27 PM
and magically now they appeared ๐Ÿ˜•
c

creamy-potato-29402

02/01/2019, 11:27 PM
๐Ÿ˜
hmm
hard to say what happened.
e

early-musician-41645

02/01/2019, 11:28 PM
I may have screwed up somewhere along the line. But doesn't
refresh
deleting them suggest they were created in the first place?