https://pulumi.com logo
#getting-started
Title
# getting-started
i

important-energy-56546

02/15/2024, 12:55 AM
Are there good use-case documentations for pulumi? In my lab, because I'm using multiple machines with pulumi, i'm having to re-import frequently because other machines are being used to modify my k8s cluster. Is that normal?
l

little-cartoon-10569

02/15/2024, 1:25 AM
No. If you share state (and you should), then this is not normal.
If you have separate state files on each machine, then it is expected, but wrong.
i

important-energy-56546

02/15/2024, 1:27 AM
So how do I share state between two separate machines?
l

little-cartoon-10569

02/15/2024, 1:27 AM
You could use the Pulumi app, or a cloud backend like S3.
i

important-energy-56546

02/15/2024, 1:28 AM
sorry, how do I get the state files out?
they're not stored in my source dir along w/ my other python if i'm not mistaken
l

little-cartoon-10569

02/15/2024, 1:29 AM
Depends on where you store them. What are your parameters to
pulumi login
, and what is the content of the
backend
property in your project YAML file?
i

important-energy-56546

02/15/2024, 1:30 AM
No backend specified
Copy code
/usr/bin/pulumi login --local
This is all managing my local k8s cluster , that's running k3s.
l

little-cartoon-10569

02/15/2024, 1:33 AM
If you haven't configured the backend in your project file, it'll be in your home directory. Not sure what it'll be called though. Maybe ~/.pulumi/workspaces/project-name-hash/state.json, or similar? Someone else might know, I don't use local backend, sorry.
i

important-energy-56546

02/15/2024, 1:33 AM
no bigs. but it sounds like the most frequent usecase isn't local
l

little-cartoon-10569

02/15/2024, 1:34 AM
Yes, local is ok for practice and investigation, but it's not a good idea for anything production-like. You'd have to manage your own version control, locking, backups, etc.
And of course, you can't deploy from anywhere else without importing over and over again...
i

important-energy-56546

02/15/2024, 1:35 AM
yep.
luckily importing is quick for what i'm playing with, but also good to know it only works w/ gcp/aws/az
l

little-cartoon-10569

02/15/2024, 1:37 AM
What does? Shared backends? There are other places to store them. The Pulumi cloud service being the most notable. But also, a shared drive that's properly backed up can work, if you're careful.
i

important-energy-56546

02/15/2024, 1:38 AM
trying to keep it all in house per se.
but yeah, if i have money to pay for a production level k8s cluster in the real world, I can pay for pulumi cloud
l

little-cartoon-10569

02/15/2024, 1:41 AM
Pulumi service is very cheap when you have a small number of resources. And of course, you can use S3 or similar.
i

important-energy-56546

02/15/2024, 1:43 AM
yep.
l

limited-rainbow-51650

02/15/2024, 5:00 PM
@important-energy-56546 have a look at MinIO which offers an S3 compatible API that works with Pulumi. You can deploy that within your own network to share your state files.