Docsright arrowEdge Stackright arrowAmbassador Edge Stack quick start

5 min • read

Ambassador Edge Stack quick start

To begin using Ambassador Edge Stack, you’ll start by obtaining a license, applying the license to your environment, installing Ambassador Edge Stack, and configuring it to route traffic from the edge of your Kubernetes cluster. This guide walks you through each step so you can quickly get started.

Obtaining a license

To obtain a license for Ambassador Edge Stack, contact us. Our team will provide a JSON Web Token (JWT).

We recommend saving your license as a variable using the export LICENSE_KEY="your-jwt-token" command. Then, you can reference it as $LICENSE_KEY in the following steps.

Applying the JWT to your environment

After you obtain your JWT, apply it to your environment either manually or using Helm. If you're using the Helm installation option, we recommend applying the JWT during installation. For more information, see Install using Helm.

Apply the JWT manually

To manually apply the JWT to your cluster, you need to Base64 encode it.

  1. Use the following command to encode the license.

  2. Create a Kubernetes secret named ambassador-edge-stack in the ambassador namespace, and then set its license-key field to your Base64-encoded license key. The following example shows what the resulting secret should look like.

    Note: If you're transitioning from an Ambassador Cloud token to a JWT, delete the cloud token secret after applying the new JWT secret. Edge Stack will automatically detect and use the JWT secret for licensing.

Installing Ambassador Edge Stack

You can install Ambassador Edge Stack either manually or using Helm.

Install manually

Use the following procedure to install Ambassador Edge Stack manually.

  1. Apply Kubernetes Custom Resource Definitions (CRDs) and wait for the deployment.
  2. Install the components and wait for Ambassador Edge Stack.

Install using Helm

Use the following procedure to install Ambassador Edge Stack using Helm.

Note: If you didn't apply the JWT manually, use the following flag with the helm install command: --set licenseKey.value=$LICENSE_KEY.

  1. Add the repository.

  2. Create a namespace and install.

Routing traffic from the edge

Ambassador Edge Stack uses Kubernetes Custom Resource Definitions (CRDs) to declaratively define its desired state. The workflow you're going to build uses a simple demo app, Listener CRD, and Mapping CRD. The Listener CRD tells Ambassador Edge Stack which port to listen on, and the Mapping CRD tells Ambassador Edge Stack how to route incoming requests from the edge of your cluster to the correct Kubernetes service based on the request’s host and URL path.

  1. Create a Listener resource for HTTP on port 8080.

  2. Apply the following YAML for the quote service.

  3. Apply the following YAML to your target cluster to tell Ambassador Edge Stack to route all inbound traffic to the /backend/ path to the quote service.

  4. Store the Ambassador Edge Stack load balancer IP address using a local environment variable. You'll use this variable to test access to your service.

  5. Test the configuration by accessing the service through the Ambassador Edge Stack load balancer.

Next steps

Explore some of the popular tutorials on Ambassador Edge Stack:

  • Intro to Mappings: Declaratively route traffic from the edge of your cluster to a Kubernetes service.
  • Host resource: Configure a hostname and TLS options for your ingress.
  • Rate Limiting: Create policies to control sustained traffic loads.

Ambassador Edge Stack has a comprehensive range of features to support the requirements of any edge microservice. To learn more about how Ambassador Edge Stack works, see Why Ambassador Edge Stack?