How can I use the GCP global external application load balancer as an ingress in the gke having backend config of CLIENT_IP session affinity with MAGLEV load balancing policy?
Hi @AnishGehlot ,
You can try doing a backend service with CLIENT_IP session affinity and MAGLEV load balancing policy. You may refer to the BackendConfig resource below:
apiVersion: v1
kind: Service
metadata:
name: your-service
annotations:
cloud.google.com/backend-config: '{"default": "your-backend-config"}'
spec:
selector:
app: your-app
ports:
- protocol: TCP
port: 80
targetPort: 8080
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: your-backend-config
spec:
sessionAffinity:
affinityType: "CLIENT_IP"
maglevPolicy: {}
Then, a global forwarding rule must be created which is associated to the backend service you created.
apiVersion: v1
kind: Service
metadata:
name: your-service
spec:
type: LoadBalancer
loadBalancerIP: "your-load-balancer-ip"
ports:
- protocol: TCP
port: 80
targetPort: 8080
selector:
app: your-app
This should be possible as it is not using weighted traffic splitting, as mentioned in this documentation.