HAProxy Kubernetes Ingress Controller 1.7 Documentation HAProxy Kubernetes Ingress Controller 1.7 Documentation Community edition Configuration Custom resources Global CRD HAProxy Kubernetes Ingress Controller Documentation 1.7
Global CRD The Global custom resource extends the Kubernetes API to let you manage process-level options for the ingress controller.
Install the Global custom resource Before you can use the Global custom resource, you must install its definition into your Kubernetes cluster.
Install the custom resource definition with kubectl apply
:
Community ingress controller
$ kubectl apply -f https://cdn.haproxy.com/documentation/kubernetes/1.7/community/crd/global.yaml
Verify that the installation worked by listing custom resources defined in your cluster:
output
NAME CREATED AT
globals.core.haproxy.org 2022-06-01T16:56:57Z
Use the Global custom resource With the Global custom resource, you can tune process-level options for the ingress controller. To use it:
Create a YAML file that declares a Global
resource and add properties to its spec.config
section.
In the example below, the maxconn
property limits how many concurrent TCP connections the ingress controller will accept.
example-global.yaml
apiVersion : "core.haproxy.org/v1alpha1"
kind : Global
metadata :
name : example-global
namespace : default
spec :
config :
maxconn : 60000
Deploy it to your cluster using kubectl apply
.
$ kubectl apply -f example-global.yaml
Create a new ConfigMap with the name haproxy-kubernetes-ingress
to override the one that ships with the ingress controller. Add the cr-global
key to the data
section to implement the global properties.
example-configmap.yaml
apiVersion : v1
kind : ConfigMap
metadata :
name : haproxy-kubernetes-ingress
namespace : haproxy-controller
data :
cr-global : default/example-global
Update the ConfigMap in your cluster by using kubectl apply
.
$ kubectl apply -f example-configmap.yaml
Global custom resource reference Version : core.haproxy.org/v1alpha1
Type Values string
enabled, disabled
Type Values object
Child properties
Property Type Values enabled string enabled, disabled param string
Type Values string
enabled, disabled
Next up
HAProxy Enterprise Kubernetes Ingress Controller