Create a New Project
Let’s get started with a new project in a new directory.
$ mkdir quickstart && cd quickstart
$ pulumi new kubernetes-javascript
$ mkdir quickstart && cd quickstart
$ pulumi new kubernetes-typescript
$ mkdir quickstart && cd quickstart
$ pulumi new kubernetes-python
$ mkdir quickstart && cd quickstart
$ pulumi new kubernetes-go
$ mkdir quickstart && cd quickstart
$ pulumi new kubernetes-csharp
If this is your first time running pulumi new
or most other pulumi
commands,
you will be prompted to log in to the Pulumi service.
The Pulumi CLI works in tandem with the Pulumi service
in order to deliver a reliable experience. It is free for individual use, with
features available for teams. Hitting ENTER
at
the prompt opens up a web browser allowing you to either sign in or sign up.
After logging in, the CLI will proceed with walking you through creating a new project.
This command will walk you through creating a new Pulumi project.
Enter a value or leave blank to accept the (default), and press <ENTER>.
Press ^C at any time to quit.
project name: (quickstart)
project description: (A minimal Kubernetes Pulumi program)
Created project 'quickstart'
stack name: (dev)
Created stack 'dev'
First, you will be asked for a project name and description. Hit ENTER
to accept the default values or specify new values.
Next, you will be asked for the name of a stack. You can hit ENTER
to accept the default value of dev
.
What are projects and stacks? Pulumi projects and stacks let you organize Pulumi code. Consider a Pulumi project to be analogous to a GitHub repo—a single place for code—and a stack to be an instance of that code with a separate configuration. For instance, Project Foo may have multiple stacks for different development environments (Dev, Test, or Prod), or perhaps for different cloud configurations (geographic region for example). See Organizing Projects and Stacks for some best practices on organizing your Pulumi projects and stacks.
Next, we’ll review the generated project files.