Skip to main content

Quickstart

In this tutorial, we'll grab the Nginx Docker image, configure it for Jetpack.io, and deploy it to Kubernetes – all in 5 minutes.

Prerequisites

Docker is required to package your backend as a container before deploying to the cloud.

If you don't already have Docker installed as part of your development environment, follow one of the guides below before returning to this quickstart:

kubectl, while not required, is a useful tool for inspecting and managing your deployments in Kubernetes. We recommend following the installation directions for your platform:

Initialize the project with Launchpad

Launchpad needs some initial configuration to understand the image's web process. We need only do this once per website.

  1. To install the Launchpad CLI, open a terminal and run

    curl -fsSL https://get.jetpack.io/launchpad | bash

    Launchpad CLI works on Linux, macOS, and on Windows via WSL2.

  2. Login to Launchpad CLI:

    launchpad auth login

    Logging into Launchpad allows you to deploy to the Launchpad Kubernetes cluster. You can also run on your own cluster in your Azure, AWS, GCP, or private cloud account.

  3. Initialize the project for Launchpad:

    launchpad init

    This wizard interviews you and configures the launchpad deployment strategy to match your application.

  4. Answer that Yes, this is a web server. This tells Launchpad that we want to accept inbound traffic.

    If we were building a scheduled cron job or a function that drained a queue, we could answer no.

  5. Finish the wizard, and Launchpad CLI automatically generates an appropriate launchpad.yaml file. You should commit this to source control.

Customize the launchpad.yaml file

Launchpad assumes your web server is running on port 8080 from inside a Docker container. In this section we'll customize the launchpad.yaml file to host the Nginx image which runs on port 80.

  1. Open the launchpad.yaml file in your favorite editor.

  2. Change the port line to 80.

  3. Add a new line specifying the Docker image:

        port: 80
    image: nginx:alpine

Deploy to Kubernetes using Launchpad

Now that the project is configured for Launchpad, deploying is really easy.

  1. Open a terminal in the directory with the Dockerfile and launchpad.yaml file.

  2. Deploy to Kubernetes:

    launchpad up

    Now Launchpad makes the deployment really simple. Automatically it will:

    • Build the Docker image
    • Push the image to a private registry
    • Schedule the necessary Kubernetes resources
    • Create a publicly routable URL to test the website
  3. Test the website:

    In the console output will be the publicly routable URL. Click this URL to view the web page.

Next Steps

It's easy to deploy any container image to Kubernetes with Launchpad. In this tutorial we scaffolded a website, configured it for Launchpad, and used Launchpad to deploy to Kubernetes. Launchpad is a great zero-DevOps solution for deploying to Kubernetes. Visit https://jetpack.io/launchpad/docs/ to learn more and to start deploying your content to Kubernetes with ease.