[ Kube 59.1 ] Nginx Ingress in Kubernetes Revisited
HTML-код
- Опубликовано: 21 окт 2024
- In this video, I will show you how to setup Nginx Ingress and how to route traffic to your pods. I will also show how to deploy ingress in different namespaces and its effects.
Learn Kubernetes Playlist
• Learn Kubernetes
If you wish to support me:
www.paypal.com...
Hope you found this video useful. 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.
#kubernetes #justmekubernetes #justmekubernetes
Hi Venkat,
Your videos are just the BEST. I managed to set up Nginx Ingress on a bare metal cluster (1 master 3 workers). Your videos got me familiar with everything. Thanks a lot and keep up the great work.
Hi Jan, many thanks for watching. Cheers.
Hi Venkat,
Since I started working on container and container orchestration, I started watching your videos and mostly get what I need to know. I said mostly because I am working on single node cluster, minikube for which I cannot use the information, knowledge that you have shared which are related to infrastructure. Thank you very much for knowledge sharing.
Hi Senthil, thanks for watching and taking time to comment.
I have covered Minikube, microk8s and others in my Learn Kubernetes series. Its good to use them when you start as they come with all addons and makes it easier to enable features. But I would advise you to start working on multi node kubernetes cluster as thats what you will encounter in production. No one would be using Minikube/MicroK8s in production.
And thanks for your interest in this channel. Cheers.
@@justmeandopensource Thanks. Will look into ways by which I can work on environment similar to PROD env
@@senthilkumarsubramanian8668 Cool
many thanks, this is what am checking for past two days.
Hi Vishnu, thanks for watching. Cheers.
Hello Venkat! Thank you for all your efforts! Some additional information for feature viewers: if you using nginx ingress controller version > 0.22.0 then rewrite behavior is changed and you will not able complete this lab successfully. Work around: delete rewrite action from ingress-resource-3.yaml and configure nginx virtual catalog for example deployments like: mountPath: "/usr/share/nginx/html/{blue, green}" . Hope it will be useful!
Hi Pavel, many thanks for sharing this information. I will try and do an updated video. Cheers.
It works perfectly, thank you!
Thanks for watching.
Thank you, Good knowledge
Hi Murali, thanks for watching.
That's useful. Recently stuck in slimier issue. BTW which terminal is that? Like its suggestion mechanism.
Hi Nirav, thanks for watching. Its Alacritty Terminal with Zsh shell (with zsh-autosuggestions and zsh-syntax-highlighting plugins). Cheers.
Sir, thx for sharing knowledge.
Hi Asir, thanks for watching.
First of all, Thank you for sharing those valuable information. I have a question is it possible to multiple ingress resource in different namespaces. For example, in the Default namespace there is one ingress resources that serve certain applications. And in the example namespace another ingress resources that serve another application. Keep in consideration that we have one ingress controller in the cluster.
thank you sir, and the question also, we run everything in our namespace except metallb. Metallb still connect to the ingress event it not deployed in the same namespace. metalLb run in metallb-system namespace. right ?
I have a quick question. I have a service running on Kubernetes on AWS, I used Terraform to deploy the infrastructure.
So, when I deploy a service with Type LoadBalancer, it gets assigned a LoadBalancer by AWS right away. (Not using NGNIX-INGRESS)
Now we want to increase micro-service with Nginx-Ingress and I am new to this.
Any guidelines on how I can approach this? I have a service that is already being accessed by users online.
While you get back to me, I am already trying to publish a demo to see if I can achieve this. :)
Thank you
Thanks for watching.
Hi Venkat
I would request to add another video with ssl certificate along with nginx ingress controller
Regards
Zaheer
I think I covered that on another video with Lets Encrypt and also lately I find Traefik more easy to use for these cases. Cheers.
Hi. Thanks for the great video. Is there any video of you where. you have demonstrated how we can get logs from ingress controller using jaeger or elasticsearch with filebeat? Thanks.
Hi Humayun, thanks for watching. I haven't done any videos on that.
Hi Venkat,
Thank you for creating Kubernetes playlist. It has helped me a lot.
Is there a platform to ask question regarding the content that you create?
Is it possible to create a multi-master set up without using kubespray or any other tools (just kubeadm)?
I am trying to achieve it using Google Cloud VMs.
While configuring the HA proxy as an external load balancer, what IPs should be used? The external IP or should there be any Virtual IPs?
Many thanks man in nice t-shirt 😍
Now, why I might need to implement these components in different namespaces ? Is it security best practice ?
Also, which k8s components can span across namespace like ingress controller -if it does- then ?
Hi Nur, thanks for watching. I used different namespace for isolation. And you can see which kubernetes objects are namespaced and which ones are global by using "kubectl api-resources" command and look at the namespaced column. For example, pods, secrets, persistent volume claims are namespaced while persistent volumes, clusteroles, storageclasses are not specific to any namespaces. Cheers.
how can I use a different port like nginx.example.com:55003 ? I'd like to have more than 1 application running on different port number! cheers.
Hi Venkat,
I am beginner for devops
You are inspiring me to learn many things in devops....
I would like to grow my knowledge in the real time scenario projects using Ansible, Docker-compose, K8S, ELK, AWS, Jenkins...but i don't know "How to start" Can you please suggest me your inputs?
Hi Venkat,
Can you please do video on kubectl port forwarding
Hi Raghu, thanks for watching. Kubectl port forwarding is a simple command and I don't think it deserves a separate video.
Hello Venkat, thanks much for the video.
Is there a way to access my deployment in k8s using FQDN (without adding an entry of IP address in /etc/hosts file)?.
Currently in we are using a managed K8S cluster which is GKE and the ingress controller service type is loadbalancer. So, whenever the developer commits their code into the repository, for example, using a multi-branch pipeline Jenkins job feature1 branch will be deployed to our Dev cluster using helm charts and it gives one FQDN, and the developer uses FQDN for testing if his code is working or not (but the developer never enter load balancer IP address in the hosts file).
Hai sir i tried to Instal nginx-ingress on baremetal server by following your helm method, when controller and service are running i tried to access from browser but i am not seeing default Http errors and nginx version after checking log of controller its showing*15 broken header error please help me on this
Hi Raghu, thanks for watching. I am releasing ingress related video this Tuesday. Hope that will help you. Cheers.
great videos!!!
Hi Farid, thanks for watching.
Awesome
Hi Farid, thanks for watching.
Hi sir, it is possible to run ingress-controller on v1.22.1 over bare metal setup. I have tried many times to install ingress-controller but I am able to configure it.
Hi Vivek, i can't see a reason why you wouldn't be able to install ingress controller on v1.22. It should be doable.
@@justmeandopensource Whenever I have install ingress controller, my pod is not come in running status. I did not get external ip in ingress controller & it does not create default-backend pod.
Hi, Can you please explain who will replace what in Kubernetes context if my application architecture has API-Gateway zuul is present which actually resolve the API path based on the rules via Netflix Eureka service
Thanks for watching. But I don't understand your question. Sorry.
@Venkat, we are using zuul as an API gateway to route the request to Microservice hosted on different nodes. I am actually not able to correlate from Kubernettes perspective how gateway and Kubernettes service works in this scenario
Hi Venkat,
i have been setting up my kubernetes applications on baremetal servers.
i have deployed ingress-controller in ingress-nginx namespace and
i have deployed jenkins deployment, service and ingress resource in jenkins namespace and
i have been using path base routing(no host based) and
i am accessing via nodeport as i am not able to use metallb loadbalancer IP.
when i access using ext.ip:nodeport/jenkins i am not able to access.
whereas i am able to access application that are deployed in default namespace.
Can you suggest me on this.
what is the diff btwn default and example? Are 1. and 2. scenario the same? I mean, what if I set exp2 namespace instead of default?
there is no diff between default and exp1 or exp2. default is just name
It works on path /blue and /green.. but the main page is giving 503 Service Temporarily available
Thanks for watching. Make sure all the backend services are running.
May be you should try to use full service name (with namespace at least) in ing resource manifest at last case?
Any example with link?.... Tried with External Name SVC, but throwing dns resolve error in ingress controller
ingress resource entry for service name with namespace would be able to direct to different namespace. Thanks.
Tried too get it but no luck... Any sample?
Using this approach, The LoadBalancer never gives an external IP with aws.
Got stuck at pending :(
Hi Alugbin, thanks for watching. Metallb is a load balancing solution for on-prem setup. If you are in AWS you can just use ALB. Cheers.
@@justmeandopensource Thanks a lot for your response.
I am not using any AWS resource other than the EC2, so the idea is to make it a form of hybrid.
Also, how do I switch to ALB with the helm chart?
Thanks again :)
@@alugbinabiodun kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/controller/config/
You probably want to use something like this, to deploy an ALB based upon ingress resources.
instead of metallb can we use ALB im working on aws hosting installed k8s with ansible playbook with one master nd one node
Hi Venkatesh, thanks for watching. Yes ofcourse, you can use ALB if you are in cloud. Metallb is for on-prem solution.
@@justmeandopensource biut i cant get the external ip for that when im using ALB
im using application load balancer and im created certification i m updated my route 53 dns in my godaddy dns
now im trying to create ingress controller but im not getting my ALB as my external ip
please tell me proper solution im struggling from last 2 week i understand the ingress concept but i dont able to do that process properly
Hi Venkat....I kind of faced sort of similar issue reported in github. I deployed the Ingress Contorller using a mainfest file from offical K8 Nginx-Ingress repo. Here is mainfest file - github.com/kubernetes/ingress-nginx/tree/master/deploy/static/provider/cloud
When you run kubectl apply -f, it creates a NS called ingress-nginx and deploys controller into it. I then created main, blue and green deployments & Ingress using your K8 repo yamls. Here is how the whole thing look -
gist.githubusercontent.com/Cloud-Mak/bed45c52957e2a1800e18c36a354b69b/raw/6686fe146ec27e748311b90b5e7255e31e214ead/gistfile1.txt
So in my case -
1. I am not using helm for ingress conroller deployment (which is what I want)
2. official mainfest creates ingress controller in its own NS
3. I have deployment & ingress running in default NS. The Ingress Controller is running in its own NS. Metal LB is set and assigning external IP to ingress-nginx-controller.
Its not working. I get 404 Not Found for main.example.com
I even created a reddit post for this....but couldn't do much follow up on issue. Here it is - www.reddit.com/r/kubernetes/comments/ha2e45/nginx_ingress_on_baremetal_k8_with_metallb/fv0bmai/ (I made reddit post to look for proper mainfest file to get nginx-ingress up. Was not interested in getting it with help of helm.)
Can you please quickly check by deploying ingress conroller using the mainfest and see if things are working. Please excuse the long comment.
Hi,
Bumping this comment in case you missed it.