https://pulumi.com logo
#kubernetes
Title
# kubernetes
a

adamant-librarian-73464

08/01/2023, 12:34 PM
Hello, I’m facing an issue and I’m not sure if I’m missing something or it’s expected behaviour . So I’m trying to move node-exporter to pulumi and I can do it via CLI using pulumi import. Pulumi import basically get the whole node-exporter configuration and prints it so I can just copy/paste into
index.ts
and after that just pulumi up to deploy. Right now I have pulumi operator so using CLI is not an option and my understanding is that we can do this via code too but I’m doing something wrong since I’m getting
Copy code
error: inputs to import do not match the existing resource
My code is
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as kubernetes from "@pulumi/kubernetes";

const node_exporter = new kubernetes.apps.v1.Deployment("node-exporter", {}, {
    import: "monitoring/prometheus-node-exporter"
});
Copy code
kubectl get daemonset -n monitoring
NAME                                  READY   UP-TO-DATE   AVAILABLE   AGE
prometheus-node-exporter                   1/1     1            1           5d20h
2 Views