Skip to main content

Kubernetes Operator Quickstart

This guide will walk you through installing the ngrok Kubernetes Operator.

Prerequisites

  • A K8s cluster with kubectl access - We recommend using a recent version of K8s and will specify and test past versions as a part of this GitHub issue
  • helm - 3.0.0 or later.

Need a quick cluster for testing/development? Check out the local cluster guide first!

Installation

1. Add the ngrok Helm chart

Loading…
note

Whenever you want to update the operator or install a new version, you must run helm repo update to fetch the latest charts.

2. Get your ngrok API Key and Auth Token

In order to use the ngrok Kubernetes Operator, you will need an ngrok account. Once you have an account, you will need to log into the ngrok dashboard to gather the necessary credentials.

You will need two things from the dashboard:

  • Your auth token, which can be found here
  • An API key, which can be generated here

These credentials will be created as a Kubernetes secret, which the controller will have access to. The auth token is used to create tunnels, and the API key is used to manage resources via the ngrok API.

Loading…

3. Select your Namespace

Set the following variable to whatever you would like the installation namespace to be. We recommend using the default ngrok-operator namespace unless you need to change that.

Loading…

4. (Optional) Install Gateway API CRDs

If you plan on using the Gateway API CRDs with the ngrok Kubernetes operator, install them before the operator. When the operator starts up it will enable support for Gateway API if the Gateway API CRDs are detected in your cluster. If you do not plan on using the Gateway API, then you can ignore this optional step. The Gateway API CRDs can be installed at a later point, but you will need to restart the operator after installing the Gateway API CRDs for the Gateway API support to be enabled.

You can select either the standard or experimental set of Gateway API CRDs depending on your preference. Either version will work with the ngrok Kubernetes operator.

https://gateway-api.sigs.k8s.io/guides/

After installing the Gateway API CRDs, create the following GatewayClass so that you can mark which Gateway API resources that the ngrok operator should handle

Loading…

5. (optional) Find a Specific Version

The following command will print out a list of all the available versions of the ngrok Kubernetes operator chart including development releases.

If you want to update to a specific release of the operator instead of updating to the latest version, you add --version <Chart Version> to the following helm install command.

This step is necessary if you plan on upgrading to a development version as helm will never install these versions for you unless you explicitly specify that you want to install a development version. Development versions are considered any version that does not follow the format <major version>.<minor version>.<patch version> such as 0.18.0-rc.1. Many of the development versions of the ngrok Kubernetes operator follow that format with rc standing for Release Candidate. These are early development builds before an official release and may contain features that have not been fully implemented or bugs that have not been identified through testing.

Loading…

6. Install the Operator

While you can pass the credential values directly via helm values like the below simple example shows, we do not recommend this for production scenarios. Instead, we recommend creating a Kubernetes secret and passing the secret name to the helm chart. This allows for easier infrastructure as code and prevents users with access to the cluster from viewing the API key and auth token using commands like helm get values. Select one of the below options based on which method you are comfortable with.

Loading…

Next Steps

Now that you have the operator, consider:

Pricing

The ngrok Kubernetes Operator is available to all ngrok users at no additional charge. You only incur costs if the resources provisioned by the controller incur a cost. More details can be found on our pricing page.