Create a Kubernetes Ingress Controller
- Last Updated: July 25, 2024
- 1 minute read
- LoadMaster
- LoadMaster LTSF
- Documentation
You must define a Kubernetes Ingress Object that stores the configuration that the LoadMaster requires. Here is an example YAML file:
apiVersion: extensions/v1beta1 kind: Ingress metadata: name: kemp-ingress annotations: "kemp.ax/vsip": "<VirtualServiceAddress>" "kemp.ax/vsport": "<VirtualServicePort>" "kemp.ax/vsprot": "<tcp/udp>" spec: rules: - host: <HostAddress1> http: paths: - path: </Path1> backend: serviceName: <ServiceName1> servicePort: <ServicePort1> - host: <HostAddress2> http: paths: - path: </Path2> backend: serviceName: <ServiceName2> servicePort: <ServicePort2>
Note: You cannot use both spec.ingressClassName and metadata.annotations.kubernetes.io/ingress.class together. If you do, you
will get an error like "The Ingress "<ingress-name>" is invalid:
annotations.kubernetes.io/ingress.class: Invalid value: "kempLB": can not be set
when the class field is also set." However, you can use one of the two methods
(annotation or ingressClassName) by itself - just not both.
In your Kubernetes Shell session, run:
kubectl apply -f <Filename>.yaml
In your Kubernetes Shell session, run the following command to see the ingress details:
kubectl describe ingress <Name>