By using below ConfigMap and Deployment i am able to enable row tcp connecting in nginx ingress
ConfigMap.yml
apiVersion: v1
kind: ConfigMap
metadata:
name: tcp-services
namespace: ingress-basic
data:
65432: "default/tis-platform:65432"
Deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
...
spec:
selector:
matchLabels:
...
replicas: 2
revisionHistoryLimit: 10
minReadySeconds: 0
template:
metadata:
labels:
...
spec:
containers:
- name: controller
image: registry.k8s.io/ingress-nginx/controller:v1.9.5
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command:
- /wait-shutdown
args:
- /nginx-ingress-controller
- --publish-service=$(POD_NAMESPACE)/my-ingress-nginx-controller
- --election-id=my-ingress-nginx-leader
- --controller-class=k8s.io/ingress-nginx
- --ingress-class=nginx
- --configmap=$(POD_NAMESPACE)/my-ingress-nginx-controller
- --validating-webhook=:8443
- --validating-webhook-certificate=/usr/local/certificates/cert
- --validating-webhook-key=/usr/local/certificates/key
- --tcp-services-configmap=ingress-basic/tcp-services
Right now it's working based on Round Robin, how can i implement nginx other Load Balancing Algorithms for above case?
Right now it's working based on Round Robin, how can I implement nginx other Load Balancing Algorithms for the above case?