Deploy with ZenML CLI

Deploying ZenML on cloud using the ZenML CLI.

The easiest and fastest way to get running on the cloud is by using the deploy CLI command. It currently only supports deploying to Kubernetes on managed cloud services. You can check the overview page to learn about other options that you have.

Before we begin, it will help to understand the architecture around the ZenML server and the database that it uses. Now, depending on your setup, you may find one of the following scenarios relevant.

Option 1: Starting from scratch

If you don't have an existing Kubernetes cluster, you have the following two options to set it up:

Creating it manually using the documentation for your cloud provider. For convenience, here are links for AWS, Azure, and GCP.

Using a stack recipe that sets up a cluster along with other tools that you might need in your cloud stack like artifact stores and secret managers. Take a look at all available stack recipes to see if there's something that works for you.

Once you have created your cluster, make sure that you configure your kubectl client to talk to it.

You're now ready to deploy ZenML! Run the following command:

zenml deploy

You will be prompted to provide a name for your deployment and details like what cloud provider you want to deploy to — and that's it! It creates the database and any VPCs, permissions, and more that are needed.

In order to be able to run the deploy command, you should have your cloud provider's CLI configured locally with permissions to create resources like MySQL databases and networks.

Reasonable defaults are in place for you already and if you wish to configure more settings, take a look at the next scenario that uses a config file.

Option 2: Using existing cloud resources

Existing Kubernetes cluster