DocsEdge Stack
Ambassador Edge Stack quick start
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.
Use the following command to encode the license.
Create a Kubernetes secret named
ambassador-edge-stack
in theambassador
namespace, and then set itslicense-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.
- Apply Kubernetes Custom Resource Definitions (CRDs) and wait for the deployment.
- 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
.
Add the repository.
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.
Create a
Listener
resource for HTTP on port 8080.Apply the following YAML for the
quote
service.Apply the following YAML to your target cluster to tell Ambassador Edge Stack to route all inbound traffic to the
/backend/
path to thequote
service.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.
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?