[ 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

Комментарии • 72

  • @janl.6568
    @janl.6568 4 года назад +3

    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.

  • @senthilkumarsubramanian8668
    @senthilkumarsubramanian8668 4 года назад +1

    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.

    • @justmeandopensource
      @justmeandopensource  4 года назад +1

      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.

    • @senthilkumarsubramanian8668
      @senthilkumarsubramanian8668 4 года назад +1

      @@justmeandopensource Thanks. Will look into ways by which I can work on environment similar to PROD env

    • @justmeandopensource
      @justmeandopensource  4 года назад +1

      @@senthilkumarsubramanian8668 Cool

  • @vishnuvenu3283
    @vishnuvenu3283 4 года назад +1

    many thanks, this is what am checking for past two days.

  • @foxipub3629
    @foxipub3629 3 года назад +2

    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!

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Hi Pavel, many thanks for sharing this information. I will try and do an updated video. Cheers.

  • @joanjett93
    @joanjett93 3 года назад +1

    It works perfectly, thank you!

  • @muralidhart4708
    @muralidhart4708 4 года назад +1

    Thank you, Good knowledge

  • @NiravPancholi
    @NiravPancholi 2 года назад +1

    That's useful. Recently stuck in slimier issue. BTW which terminal is that? Like its suggestion mechanism.

    • @justmeandopensource
      @justmeandopensource  2 года назад

      Hi Nirav, thanks for watching. Its Alacritty Terminal with Zsh shell (with zsh-autosuggestions and zsh-syntax-highlighting plugins). Cheers.

  • @TheBullz007
    @TheBullz007 4 года назад +1

    Sir, thx for sharing knowledge.

  • @mohammedgori8936
    @mohammedgori8936 2 года назад

    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.

  • @randythamrin5976
    @randythamrin5976 3 года назад

    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 ?

  • @Learn_with_cosmos
    @Learn_with_cosmos 3 года назад

    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. :)

  • @aryadiadi6888
    @aryadiadi6888 3 года назад +1

    Thank you

  • @zaheerhussain5311
    @zaheerhussain5311 3 года назад +1

    Hi Venkat
    I would request to add another video with ssl certificate along with nginx ingress controller
    Regards
    Zaheer

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      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.

  • @humayunrashid6709
    @humayunrashid6709 4 года назад +1

    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.

    • @justmeandopensource
      @justmeandopensource  4 года назад +1

      Hi Humayun, thanks for watching. I haven't done any videos on that.

  • @anjanpoonacha
    @anjanpoonacha 4 года назад

    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?

  • @nah0221
    @nah0221 4 года назад +1

    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 ?

    • @justmeandopensource
      @justmeandopensource  4 года назад +1

      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.

  • @oraculotube
    @oraculotube 4 года назад +1

    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.

  • @surendarmurugesan9797
    @surendarmurugesan9797 4 года назад

    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?

  • @raghuveer120
    @raghuveer120 3 года назад +1

    Hi Venkat,
    Can you please do video on kubectl port forwarding

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Hi Raghu, thanks for watching. Kubectl port forwarding is a simple command and I don't think it deserves a separate video.

  • @Siva-ur4md
    @Siva-ur4md 3 года назад

    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).

  • @R-Kannada-DevOps
    @R-Kannada-DevOps 2 года назад +1

    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

    • @justmeandopensource
      @justmeandopensource  2 года назад

      Hi Raghu, thanks for watching. I am releasing ingress related video this Tuesday. Hope that will help you. Cheers.

  • @faridakbarov4532
    @faridakbarov4532 4 года назад +1

    great videos!!!

  • @mustufamithaiwala7205
    @mustufamithaiwala7205 4 года назад +1

    Awesome

  • @vivektrivedi972
    @vivektrivedi972 3 года назад +1

    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.

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      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.

    • @vivektrivedi972
      @vivektrivedi972 3 года назад

      @@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.

  • @engnrankit
    @engnrankit 3 года назад +1

    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

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Thanks for watching. But I don't understand your question. Sorry.

    • @engnrankit
      @engnrankit 3 года назад

      @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

  • @ravindrachowdary205
    @ravindrachowdary205 3 года назад

    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.

  • @stdio9965
    @stdio9965 2 года назад

    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?

    • @stdio9965
      @stdio9965 2 года назад

      there is no diff between default and exp1 or exp2. default is just name

  • @ShyamKumar-yn2jw
    @ShyamKumar-yn2jw 4 года назад +1

    It works on path /blue and /green.. but the main page is giving 503 Service Temporarily available

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Thanks for watching. Make sure all the backend services are running.

  • @sablinigor
    @sablinigor 4 года назад

    May be you should try to use full service name (with namespace at least) in ing resource manifest at last case?

    • @muralidhart4708
      @muralidhart4708 4 года назад

      Any example with link?.... Tried with External Name SVC, but throwing dns resolve error in ingress controller

  • @asishmm
    @asishmm 4 года назад

    ingress resource entry for service name with namespace would be able to direct to different namespace. Thanks.

    • @muralidhart4708
      @muralidhart4708 4 года назад

      Tried too get it but no luck... Any sample?

  • @alugbinabiodun
    @alugbinabiodun 4 года назад +2

    Using this approach, The LoadBalancer never gives an external IP with aws.
    Got stuck at pending :(

    • @justmeandopensource
      @justmeandopensource  4 года назад +2

      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.

    • @alugbinabiodun
      @alugbinabiodun 4 года назад

      @@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 :)

    • @stuh84
      @stuh84 4 года назад

      @@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.

  • @venkateshponnaganti8719
    @venkateshponnaganti8719 4 года назад

    instead of metallb can we use ALB im working on aws hosting installed k8s with ansible playbook with one master nd one node

    • @justmeandopensource
      @justmeandopensource  4 года назад

      Hi Venkatesh, thanks for watching. Yes ofcourse, you can use ALB if you are in cloud. Metallb is for on-prem solution.

    • @venkateshponnaganti8719
      @venkateshponnaganti8719 4 года назад

      @@justmeandopensource biut i cant get the external ip for that when im using ALB

    • @venkateshponnaganti8719
      @venkateshponnaganti8719 4 года назад +1

      im using application load balancer and im created certification i m updated my route 53 dns in my godaddy dns

    • @venkateshponnaganti8719
      @venkateshponnaganti8719 4 года назад

      now im trying to create ingress controller but im not getting my ALB as my external ip

    • @venkateshponnaganti8719
      @venkateshponnaganti8719 4 года назад

      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

  • @makrand1584
    @makrand1584 4 года назад

    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.

    • @makrand1584
      @makrand1584 4 года назад

      Hi,
      Bumping this comment in case you missed it.