Installation
Install on Rancher
HAProxy Enterprise Kubernetes Ingress Controller is available on Rancher, an open-source multi-cluster orchestration platform. This section shows you how to install HAProxy Enterprise Kubernetes Ingress Controller on Rancher.
Add a TLS certificate Jump to heading
You’ll need to configure a TLS certificate in Rancher if you plan to use HTTPS. You can add TLS certificates to your Kubernetes cluster by storing them in a special type of resource called a TLS Secret. Rancher provides a convenient way to add these using its Certificates management window.
-
Locate your PEM-formatted certificate and private key files to import them into Rancher.
-
Choose a project within one of your clusters, such as the Default project.
-
Go to Storage > Secrets.
-
Click Create.
-
Select TLS Certificate.
-
Give the certificate a name.
-
Paste the values for the public certificate and private key into the corresponding boxes.
-
Click Create.
Launch the ingress controller Jump to heading
HAProxy Enterprise Kubernetes Ingress Controller is available as a Rancher Catalog app.
-
From either the ‘Global’ or ‘Project’ scope, go to Apps > Charts.
-
Enter
haproxy
in the filter field. -
Select the HAProxy Kubernetes Ingress Controller chart.
-
Click Install.
-
Indicate the namespace to use.
-
Select Customize Helm options before install and click Next.
-
On the Edit Options screen, clear the Use Default Image checkbox.
-
Change the HAProxy Ingress Controller Tag field to your desired tag, for example,
v3.0.12-ee1
. To see tags, launch the Kubectl shell and run this command, setting<KEY>
to your HAProxy Enterprise key:nixcurl -s --user <KEY>:<KEY> https://kubernetes-registry.haproxy.com/v2/hapee-ingress/tags/list | jq '.tags | sort | reverse'nixcurl -s --user <KEY>:<KEY> https://kubernetes-registry.haproxy.com/v2/hapee-ingress/tags/list | jq '.tags | sort | reverse' -
Set Deployment Type to
Deployment
orDaemonSet
depending on how you’d like to run the HAProxy Kubernetes Ingress Controller service. -
Set Service Type to
NodePort
orLoadBalancer
depending on how you would like to access the service. -
Optional: Set the TLS Certificate Secret field to the name of your TLS Certificate secret if you created one, such as
my-cert
. -
Select the HAProxy Enterprise tab in the Settings menu, then enable HAProxy Enterprise mode.
-
Set Registry to
kubernetes-registry.haproxy.com
. -
Set Repository to
kubernetes-registry.haproxy.com/hapee-ingress
. -
Set both Username and Password to your HAProxy Enterprise license key.
-
Click Next, then Install.
Optional: Disable the default NGINX ingress controller Jump to heading
When you launch HAProxy Kubernetes Ingress Controller into your Rancher cluster, it watches for Ingress objects and creates routes for ingress traffic.
However, the default NGINX Ingress Controller is also running and doing the same job. You can disable this default ingress controller as follows:
- Select your cluster to display the cluster dashboard.
- Select More Resources > Networking > IngressClasses.
- Select nginx and click Delete.
Add an Ingress to publish a workload Jump to heading
After you deploy a container workload, you add an Ingress as follows:
-
Under your cluster, go to Service Discovery > Ingresses, then click Create.
-
Set a name to uniquely identify this ingress rule.
-
To apply the ingress routing rule based on a requested host name, set the Request Host field to a value like
example.com
. -
To apply the ingress routing rule based on the requested URL path, set a path, such as
/foo
. -
Set the target service to which you’d like to route traffic.
-
Set the service’s listening port.
-
On the Ingress Class tab, set Ingress Class to
haproxy
. -
Click Create.
By default, the ingress controller listens on NodePort endpoints. From the Service Discovery > Services screen, select the HAProxy service, then view the Ports tab to see the assigned NodePorts.
Do you have any suggestions on how we can improve the content of this page?