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")
.withLicenseKey("license-key")
.build())
.build();
For more details, see the Ambassador in Azure sample on GitHub.
Pushing prerequisite images to Azure Container Registry
If the required images are missing in your Fractal container registry, push them using a script like this:
resourceGroupId="<your resource group id>"
subscription="<your subscription id>"
az acr login --name ${resourceGroupId}acr
# aes
docker pull "docker.io/datawire/aes:2.3.1"
docker tag "docker.io/datawire/aes:2.3.1" "${resourceGroupId}acr.azurecr.io/${subscription}/yanchware/datawire/aes:2.3.1"
docker push "${resourceGroupId}acr.azurecr.io/${subscription}/yanchware/datawire/aes:2.3.1"
# redis:5.0.1
docker pull "docker.io/redis:5.0.1"
docker tag "docker.io/redis:5.0.1" "${resourceGroupId}acr.azurecr.io/${subscription}/yanchware/redis:5.0.1"
docker push "${resourceGroupId}acr.azurecr.io/${subscription}/yanchware/redis:5.0.1"