curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.shhelm repo add haproxytech https://haproxytech.github.io/helm-charts
helm repo update
helm install haproxy-kubernetes-ingress haproxytech/kubernetes-ingress --create-namespace --namespace haproxy-controllerkubectl get svc haproxy-kubernetes-ingress -n haproxy-controllerIn Column PORT(S), they are the nodeports equivalent to the local port
- First make sure there is a ClusterIP service for the pod - ex:
app-service - Create Ingress with
ingressClassName: haproxy
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app-ingress
annotations:
haproxy.org/path-rewrite: /
spec:
ingressClassName: haproxy
rules:
- http:
paths:
- path: /example
pathType: Prefix
backend:
service:
name: app-service
port:
number: 80- Now you can access the pod application through
<ANY_NODE_IP>:<NODE_PORT>/example