[ Kube 106.3 ]Kubernetes Ingress | Sticky Sessions
Вставка
- Опубліковано 10 лют 2025
- In this video, I will show you how to configure sticky sessions in Nginx ingress controller in Kubernetes cluster with Metal LB for load balancing.
MetalLB:
metallb.univer...
Kubernetes-ingress:
kubernetes.git...
😺 Github:
github.com/jus...
📺 Learn Kubernetes Playlist:
• Learn Kubernetes
Hope you enjoyed this video. Please share it with your friends and don't forget to subscribe to my channel. For any questions/issues/feedback, please leave me a comment and I will be happy to help.
👏 Thanks for watching.
💗 If you wish to support me:
www.paypal.com...
I was just trying to figure this out for hours last night, and this pops into my feed, youtube works in mysterious ways lol, can't wait to go back home and watch it and see if I can figure this out!!
Haha.. Hope this video helps you. Cheers.
Oh man ı just accomplished this yesterday but thanks for covering my suggested topic much love cheers
Sorry for the delay. I had few videos scheduled before this. And also brought this forward ahead of the schedule. Anyways glad to hear that you have sorted it out. Cheers.
@@justmeandopensource During my tests i noticed something maybe you can find an explanation and solution... I was using your original ingress resource with "/" "/blue" "/green" subpaths. First i thought cookie did not working but then i noticed there are two cookies for "/" and "/blue" and they point to different pod sessions. When i refresh "/blue" it showed different pod names. Then i changed "/" to "/main" and no more different cookies so affinity achived. Any idea for using root path and subpaths together without multiple cookies. Maybe there is a way to link cookies only the domain. Thanks again
I would kind of expect that behaviour as / and /blue are served by different backend services and in turn different pods. What ingress controller is doing is sticking to the same pod each for / and /blue. This is microservice behaviour. / and /blue are two different microservices.
@@justmeandopensource maybe i should explain better. / subpath cookie effects /blue because browser keeps cookies for the domain so when i go to / binds to kworker1 node then /blue binds kworker2 and i have two cookies that i can see in chrome. after that when i refresh /blue it shows different blue on different worker nodes so different blue pod ids does this makes sense
@@engboz sorry. It does now. I will have to play with it a bit to understand better.
I am waiting sir.. ..thank you so much 🥰❤️
Always welcome. Thanks for watching. Cheers.
Great content. Keep the momentum.
Thanks, will do! Cheers.
Super explain and great
Hi Ganesh, Thanks for watching.
Greate content. Thanks for making videos.
Please make a video on how to configure mode security in nginx ingress 😊😊
Hi, thanks for watching. I will add modSecurity to my list. Cheers.
Would like to check if this application has a session for user login, if session affinity is configured, while handling traffic, that particular pod died, what will happen to user's session. Thanks
Metallb operates at Layer 2 (data link layer)? I have heard Layer 4 and Layer 7. What's the benefit of L2?
Keep in mind that there is 2 nginx ingress controllers, 1. nginx ingress that is developed by nginx, free version doesn't supports sticky sessions (only paid version "nginx plus"). 2. nginx ingress controller by Google (that is shown in this video). So if something doesn't work for you, check which ingress you deployed.
Many thanks for sharing the point that I missed. Hope people will find the right ingress controller as I have pasted the link in the video description.
Hi,
I have a query related to video which you have done in past and for some fixes made a new video for the same.
Now, say you have kube 3.1 video which needed some fix and now you have created kube 130.1 in this do you also update the description of 3. 1 stating update video is name as xyz and available in this link
I am asking this as i didn't notice that.
Hi Amit, thanks for your interest in this channe. I mostly try to back link the follow up video in the original video's description. But given the amount of videos I have in this playlist, its getting much harder to maintain references and links. Too much of admin work that I have little time to deal with. I don't update the video title. But usually I will relate the title in the follow up video. Eg: If the original video was Kube 30.1, then the follow up video will be Kube 30.2 and so on. Cheers.
@@justmeandopensource thanks a lot for the response.
Great!Any plans for drone, tekton, argocd? thanks
Some of them are in my list for a long time. I will get to it at some point :)
Hard to find k8s contents that matches this standard.
Could you also make some videos on setting up externalDns with ingress.
Thanks
Thanks for watching. I can add externalDns topic to my list. Cheers.
Did you use Kind to create your cluster?
No. My usual vagrant provisioning method that used kubeadm.
Can u pls show about topology spread constraints and what is diff between pdb and topology spread constraints
Honestly I have no idea what you are talking about and I need to look it up in the internet.
In your deployment, what's the need for Metallb (as a pod and not external service) when Nginx acts as a loadbalancer itself?
In this video, Nginx doesn't act as load balancer but a reverse proxy server. It only knows where to send the traffic based on the ingress configuration. Its the internal kubernetes service that load balances between the replicas. How would you get a Load Balancer IP from Nginx? Thats done by Metallb.
What happens if the pod got destroyed before the TTL expires?
In that case the request will be served by the other pod.
Hello Sir! it was really nicely explained about the sticky session on Ingress... but I have few quesition... what will happen if that pod fails and restarted by k8... will that pod losses the user session / state? or how it is going to maintain the state of the user? kindly let me know I am curious.
Hi Solomon, thanks for watching.
User session information is stored on the client side in the browser in the form of cookies. If the pod that was serving the user request previously fails, all successive requests will be routed to the other available pods.
great video as always sir
Sir could you please make a detailed video on sealed secrets in kubernetes
Sure. I will add it to my list. Thanks for watching.
@@justmeandopensource glad to hear from you
@@chandanpinacle3455 Cheers.
Hi, thanks again for another great video, you have no idea how rare videos of this kind of content are!
I had a question for you regarding a video you posted some time ago. I'm trying to setup a local jupyterhub cluster and I followed the videos you have regarding that, I was able to setup the nfs client provisioner but now I'm stuck in the metallb part, an external ip doesn't get assigned to the load Balancer. I'm using the latest metallb version which is even greater than the one on this video. It also seems they stopped using configmaps. I searched a little bit and it seems there is some problem when I am trying to assigning a range of ip's when you are using dhcp. This is a bare metal cluster and the only network I have uses dhcp to assign the ip's to the machines i'm using in my kubernetes cluster (2 machines). Any suggestion?
Thanks again for the videos again and keep up this great work
Great content.
Please do a tutorial for kubernetes operator?
Thanks for watching. I will look into operators at some point. Cheers.
@@justmeandopensource I''be waiting for it.. Yeaahh 😁
Cheers
hallo sir, would you like to make tutorial about Sticky Sessions but in Istio Ingress Gateway,
thank you sir.
Sure. I will add it to my list.