Installation
Install on Azure AKS
This section shows you how to install HAProxy Enterprise Kubernetes Ingress Controller in Azure Kubernetes Service.
Pre-installation checklist Jump to heading
- A running AKS Kubernetes cluster
- The Azure CLI
- The helm command-line tool
- The kubectl command-line tool
Connect to your AKS cluster Jump to heading
-
Connect to your cluster using the Azure CLI:
bashaz account set --subscription [Your Azure subscription ID]az aks get-credentials --resource-group [Your resource group] --name [Your AKS cluster name]bashaz account set --subscription [Your Azure subscription ID]az aks get-credentials --resource-group [Your resource group] --name [Your AKS cluster name] -
Check that you can access the cluster by calling
kubectl get pods
:bashkubectl get podsbashkubectl get podsoutputbashNo resources found in default namespace.outputbashNo resources found in default namespace.
Install Jump to heading
Choose one of the following installation methods:
Install with Helm Jump to heading
-
Add the HAProxy Technologies Helm repository:
bashhelm repo add haproxytech https://haproxytech.github.io/helm-chartsbashhelm repo add haproxytech https://haproxytech.github.io/helm-charts -
Update your list of charts:
bashhelm repo updatebashhelm repo update -
Install the ingress controller, replacing
[KEY]
with your HAProxy Enterprise license key:bashhelm install haproxy-kubernetes-ingress haproxytech/kubernetes-ingress \--create-namespace \--namespace haproxy-controller \--set controller.imageCredentials.registry=kubernetes-registry.haproxy.com \--set controller.imageCredentials.username=[KEY] \--set controller.imageCredentials.password=[KEY] \--set controller.image.repository=kubernetes-registry.haproxy.com/hapee-ingress \--set controller.image.tag=v1.9 \--set controller.service.type=LoadBalancer \--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"="/healthz"bashhelm install haproxy-kubernetes-ingress haproxytech/kubernetes-ingress \--create-namespace \--namespace haproxy-controller \--set controller.imageCredentials.registry=kubernetes-registry.haproxy.com \--set controller.imageCredentials.username=[KEY] \--set controller.imageCredentials.password=[KEY] \--set controller.image.repository=kubernetes-registry.haproxy.com/hapee-ingress \--set controller.image.tag=v1.9 \--set controller.service.type=LoadBalancer \--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"="/healthz"This will create an Azure Load Balancer that routes traffic to the ingress controller service. You can map the load balancer’s IP address to your public DNS domain name.
By default, the Helm chart adds
--ingress.class=haproxy
to the ingress controller. That means that it will useIngress
resources only if they specify an annotation ofkubernetes.io/ingress.class: haproxy
. You can disable this by setting--set controller.ingressClass=null
when callinghelm install
.
Install with kubectl Jump to heading
- Download the deployment YAML file (v1.9). 1.81.71.61.51.4
Other versions
haproxy-ingress.hapee.yamlyaml
apiVersion: v1kind: Servicemetadata:labels:run: haproxy-ingressname: haproxy-ingressnamespace: haproxy-controllerspec:selector:run: haproxy-ingresstype: LoadBalancerports:- name: httpport: 80protocol: TCPtargetPort: 80- name: httpsport: 443protocol: TCPtargetPort: 443- name: statport: 1024protocol: TCPtargetPort: 1024
haproxy-ingress.hapee.yamlyaml
apiVersion: v1kind: Servicemetadata:labels:run: haproxy-ingressname: haproxy-ingressnamespace: haproxy-controllerspec:selector:run: haproxy-ingresstype: LoadBalancerports:- name: httpport: 80protocol: TCPtargetPort: 80- name: httpsport: 443protocol: TCPtargetPort: 443- name: statport: 1024protocol: TCPtargetPort: 1024
-
Use the
kubectl apply
command to deploy the controller:bashkubectl apply -f haproxy-ingress.hapee.yamlbashkubectl apply -f haproxy-ingress.hapee.yamlThis will create an Azure Load Balancer that routes traffic to the ingress controller service. You can map the load balancer’s IP address to your public DNS domain name.
Check your installation Jump to heading
Verify that the controller is installed into your Kubernetes cluster by using the command kubectl get pods
:
bash
kubectl get pods --namespace haproxy-controller
bash
kubectl get pods --namespace haproxy-controller
outputbash
NAME READY STATUS RESTARTS AGEhaproxy-kubernetes-ingress-7dd4cc4b-x5fkv 1/1 Running 0 1m
outputbash
NAME READY STATUS RESTARTS AGEhaproxy-kubernetes-ingress-7dd4cc4b-x5fkv 1/1 Running 0 1m
Get the External IP, which you can use to access your cluster:
bash
kubectl get services --namespace haproxy-controller
bash
kubectl get services --namespace haproxy-controller
outputbash
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEhaproxy-kubernetes-ingress LoadBalancer 10.0.40.8 20.62.154.138 80:31669/TCP,443:30449/TCP,1024:31713/TCP 2m43s
outputbash
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEhaproxy-kubernetes-ingress LoadBalancer 10.0.40.8 20.62.154.138 80:31669/TCP,443:30449/TCP,1024:31713/TCP 2m43s
If this page was useful, please, Leave the feedback.