Hi,
I want to implement load balancing of multiple targets using Kong Ingress Controller. I have Kong installed in Kubernetes environment with KIC. I have created an ingress and service (ExternalName Type) which is pointing to an upstream which is external to the Kubernetes cluster. Below are the configurations -
Ingress -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: echo
spec:
rules:
- http:
paths:
- backend:
service:
name: my-service
port:
number: 443
path: /v1/status
pathType: Exact
Service -
apiVersion: v1
kind: Service
metadata:
annotations:
konghq.com/protocol: https
konghq.com/upstream-policy: demo
name: my-service
spec:
externalName: example.com
ports:
- port: 443
type: ExternalName
Below is the KongUpstreamPolicy -
apiVersion: configuration.konghq.com/v1beta1
kind: KongUpstreamPolicy
metadata:
name: demo
spec:
hashOn:
header: x-lb
hashOnFallback:
input: ip
algorithm: consistent-hashing
Here KongUpstreamPolicy is attached to service using annotations.
Where I can give multiple upstream targets in this configuration?
Here service is pointing to only one host but I want to provide multilple hosts which can be load balanced using KongUpstreamPolicy.