Pulumi & Kubernetes: Before you begin
Before we get started using Pulumi, let’s run through a few quick steps to ensure our environment is setup correctly.
Install Pulumi
Install Pulumi on macOS through Homebrew:
$ brew install pulumi/tap/pulumi
Install Pulumi on Linux by running the installation script:
$ curl -fsSL https://get.pulumi.com | sh
Install Pulumi on Windows using elevated permissions through the Chocolatey package manager:
> choco install pulumi
For alternative installation instructions (e.g. script-based installation, binaries, etc.) or troubleshooting, see Download and Install.
Next, we’ll install the required language runtime.
Install Language Runtime
Choose Your Language
Install Node.js.
If you're having trouble setting up Node.js up on your machine, see Installing Node.js via Package Manager for alternative installation options.
Install Python version 3.7 or later. To reduce potential issues with setting up your Python environment on Windows or macOS, you should install Python through the official Python installer.
pip
is required to install dependencies. If you installed Python from source, with an installer from
python.org, or via Homebrew you should
already have pip
. If Python is installed using your OS package manager, you may have to install pip
separately, see
Installing pip/setuptools/wheel with Linux Package Managers. For example, on Debian/Ubuntu you must run sudo apt install python3-venv python3-pip
.
If you're having trouble setting up Python on your machine, see Python 3 Installation & Setup Guide for detailed installation instructions on various operating systems and distributions.
Install Go.
Pulumi requires a supported version of Go— this typically refers to the two most recent minor releases. If
you're using Linux, your distribution may not provide an up to date version of the Go compiler. To check what version of Go you have installed, use:
go version
.
Install .NET SDK.
Pulumi will need the dotnet
executable in order to build and run your Pulumi .NET application. Ensure that the dotnet
executable can be found
on your path after installation.
Install Java 11 or later and Apache Maven 3.6.1 or later.
Pulumi will need the java
, javac
, and mvn
executables in order to build and run your Pulumi Java application. Ensure that these
executables can be found on your path after installation.
Next, we’ll configure Kubernetes.
Configure Kubernetes
Configure Kubernetes so the Pulumi CLI can connect to a Kubernetes cluster. If you have previously configured the kubectl CLI, kubectl
, Pulumi will respect and use your configuration settings. Depending on the approach you choose, you may need to apply some of the configuation after creating your project and stack in the next step.
Next, we’ll create a new Pulumi project.