How do I create a secret in a namespace other than...
# general
e
How do I create a secret in a namespace other than default in kubernetes? I've tried giving it the name
ns/secretname
like the docs suggest, but it doesn't seem to work
g
You set the name and namespace of on the
metadata
field
Copy code
const secret = new kubernetes.core.v1.Secret(
  "[NAME_OF_PULUMI_RESOURCE]",
  {
    metadata: {
      name: "[NAME_OF_SECRET_ON_K8S]",
      namespace: "[K8S_NAMESPACE]",
    },
    data: {
    // Secret data...
    },
  },
);
e
Cool, thanks!
c
btw, pulumi behaves the same as the kubernetes in general here.