Skip to main content

Ambassador in AKS

This page shows how to create an Ambassador API Gateway instance as part of an Azure Kubernetes Service (AKS) cluster.

For prerequisites, see the main guide.

Java SDK​

When you create your AKS cluster, you have the option to specify an API Gateway. In the example below, we demonstrate how to create an Ambassador instance as part of your AKS.

AzureKubernetesService.builder()
.withId("aks-1")
.withDescription("AKS with Ambassador")
.withDisplayName("AKS #1")
.region(EUROPE_WEST)
.withAPIGateway(CaaSAmbassador.builder()
.withId("api-gateway")
.withDescription("Ambassador API Gateway")
.withDisplayName("API Gateway")
.withNamespace("ambassador")
.withAcmeProviderAuthority("https://acme-v02.api.letsencrypt.org/directory")
.withHost("azure.test.mydomain.com")
.withHostOwnerEmail("owner@mydomain.com")
.withTlsSecretName("ambassador-tls-secret-name")
.build())
.build();

For more details, see the Ambassador in Azure sample on GitHub.

Pushing prerequisite images to Azure Container Registry​

If the required image is missing in your Fractal container registry, push it using a script like this:

resourceGroupId="<your resource group id>"
subscription="<your subscription id>"
az acr login --name ${resourceGroupId}acr

# emissary
docker pull "docker.io/emissaryingress/emissary:3.9.1"
docker tag "docker.io/emissaryingress/emissary:3.9.1" "${resourceGroupId}acr.azurecr.io/${subscription}/yanchware/emissaryingress/emissary:3.9.1"
docker push "${resourceGroupId}acr.azurecr.io/${subscription}/yanchware/emissaryingress/emissary:3.9.1"