https://pulumi.com logo
Title
s

sparse-hairdresser-15357

01/05/2023, 3:46 PM
Hello. We have a Pulumi managed application deployment in Kubernetes. At some point someone added an ingress outside of Pulumi and now we need to add it to the state so it can be managed by Pulumi in the future. What is the best approach for this?
pulumi refresh
does nothing. I guess because it only looks at the resources in the state.
pulumi import
fails with an authorisation error, I think because in our setup we are confined to namespaces and cannot just enumerate all the namespaces. Maybe if there is a way to specify the namespace where Pulumi needs to look this can be resolved? The error we get is:
error: Preview failed: <http://ingresses.networking.k8s.io|ingresses.networking.k8s.io> "ingress-name" is forbidden: User "user-token" cannot get resource "ingresses" in API group "<http://networking.k8s.io|networking.k8s.io>" in the namespace "default"
d

dry-keyboard-94795

01/05/2023, 3:54 PM
when doing the import, you can reference with
<namespace>/<resource name>
s

sparse-hairdresser-15357

01/05/2023, 3:56 PM
Ok, I'll give that a try. Thanks!
That did the trick. Thanks agains!