Good Evening All I have an on-prem k8s env (installed using kubeadm) and I hav . . .

Ziad Saade:
Good Evening All

I have an on-prem k8s env (installed using kubeadm) and I have installed ingress nginx controller and created an ingress resource along with an app deployment with Cluster IP service.

I’m using the ip address of the node (where the nginx controller pod is available) + the node port of the nginx controller service but the redirection rule is not working.

Kindly advice how to troubleshoot this issue?

when checking the ingress nginx log it’s giving the below message :

I0405 14:01:52.729995 6 socket.go:248] “Skipping metric for host not being served” host=“192.168.19.210”

Best Regards

unnivkn:
Hi @Ziad Saade please go through these docs, this may shed some light on your issue.

unnivkn:
https://platform9.com/blog/building-a-complete-stack-ingress-controllers/

unnivkn:
https://docs.nginx.com/nginx-service-mesh/tutorials/kic/ingress-walkthrough/

unnivkn:
https://devopscube.com/setup-ingress-kubernetes-nginx-controller/

unnivkn:
https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

Ziad Saade:
Thanks @unnivkn; i’m able to access the main page, but since i’m working on a stateful application i’m facing session issues.
Below is my ingress annotation configuration for your comments if any is missing?

annotations:
http://nginx.ingress.kubernetes.io/rewrite-target|nginx.ingress.kubernetes.io/rewrite-target: /
http://nginx.ingress.kubernetes.io/affinity|nginx.ingress.kubernetes.io/affinity: “cookie”
http://nginx.ingress.kubernetes.io/session-cookie-name|nginx.ingress.kubernetes.io/session-cookie-name: “stickounet”
http://nginx.ingress.kubernetes.io/session-cookie-expires|nginx.ingress.kubernetes.io/session-cookie-expires: “172800”
http://nginx.ingress.kubernetes.io/session-cookie-max-age|nginx.ingress.kubernetes.io/session-cookie-max-age: “172800”

PS: i’m using kubernetes deployment with 3 replicas

unnivkn:
Hi @Ziad Saade fyi: https://voyagermesh.com/docs/7.1.1/guides/ingress/http/statefulset-pod/

Ziad Saade:
thanks @unnivkn it worked,

Now i’m doing application high availability, if I have a deployment with 2 replicas, pod-1 under node-1 and pod-2 under node-2 and in case node-2 is down ingress should replicate opened session’s of pod-2 to pod-1 available under node-1 in way the customer’s connected to pod-2 don’t get any disconnection error.

kindly advice how to achieve the above.