Skip to main content

Install Ingress APISIX on Azure AKS

This document explains how to install Ingress APISIX on Azure AKS.

Prerequisites#

  • Create an Kubernetes Service on Azure.
  • Install Azure CLI and download the credentials by running az aks get-credentials.
  • Install Helm.
  • Make sure your target namespace exists, kubectl operations thorough this document will be executed in namespace ingress-apisix.

Install APISIX and apisix-ingress-controller#

As the data plane of apisix-ingress-controller, Apache APISIX can be deployed at the same time using Helm chart.

helm repo add apisix https://charts.apiseven.comhelm repo add bitnami https://charts.bitnami.com/bitnamihelm repo updatekubectl create ns ingress-apisixhelm install apisix apisix/apisix \  --set gateway.type=LoadBalancer \  --set ingress-controller.enabled=true \  --namespace ingress-apisix  --set ingress-controller.config.apisix.serviceNamespace=ingress-apisixkubectl get service --namespace ingress-apisix

Five Service resources were created.

  • apisix-gateway, which processes the real traffic;
  • apisix-admin, which acts as the control plane to process all the configuration changes.
  • apisix-ingress-controller, which exposes apisix-ingress-controller's metrics.
  • apisix-etcd and apisix-etcd-headless for etcd service and internal communication.

The gateway service type is set to LoadBalancer, so that clients can access Apache APISIX through a load balancer IP. You can find the load balancer IP by running:

kubectl get service apisix-gateway --namespace ingress-apisix -o jsonpath='{.status.loadBalancer.ingress[].ip}'

Now try to create some resources to verify the running status. As a minimalist example, see proxy-the-httpbin-service to learn how to apply resources to drive the apisix-ingress-controller.

Specify The Ingress Version#

apisix-ingress-controller will watch apiVersion of networking.k8s.io/v1 by default. If the target kubernetes version is under v1.19, add --set ingress-controller.config.kubernetes.ingressVersion=networking/v1beta1 or --set ingress-controller.config.kubernetes.ingressVersion=extensions/v1beta1 if your kubernetes cluster is under v1.16

Enable SSL#

The ssl config is disabled by default, add --set gateway.tls.enabled=true to enable tls support.

Change default apikey#

It's Recommended to change the default key by add --set ingress-controller.config.apisix.adminKey=ADMIN_KEY_GENERATED_BY_YOURSELF, --set admin.credentials.admin=ADMIN_KEY_GENERATED_BY_YOURSELF, --set admin.credentials.viewer=VIEWER_KEY_GENERATED_BY_YOURSELF, notice that ingress-controller.config.apisix.adminKey and admin.credentials.admin must be the same, and should better not same as admin.credentials.viewer.