Kubernetes Multi Container Deployment | React | Node.js | Postgres | Ingress Nginx | step by step

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ม.ค. 2025

ความคิดเห็น • 62

  • @SuperJimCarrey1
    @SuperJimCarrey1 3 ปีที่แล้ว +1

    Nagyszerű bemutató, Lengyelországi üdvözlet
    Lengyel, Magyar - két jó barát

    • @codeching
      @codeching  3 ปีที่แล้ว +1

      Köszönöm! :)

  • @Ben-nd1je
    @Ben-nd1je 2 ปีที่แล้ว +2

    Thank you !! You save my day about exposing react app with nginx in my k8s cluster

    • @codeching
      @codeching  2 ปีที่แล้ว

      You're welcome!

  • @AlexanderPoznanski
    @AlexanderPoznanski 5 หลายเดือนก่อน +1

    Thank you! A lot of useful information!

  • @wesleypacavira570
    @wesleypacavira570 ปีที่แล้ว +1

    I follow everythings right, but After deployments my browser cant Open localhost:3000

    • @wesleypacavira570
      @wesleypacavira570 ปีที่แล้ว

      I dont know whats wrong, I check everything

    • @codeching
      @codeching  ปีที่แล้ว

      Without concrete setting I cannot help you unfortunately, because there could be many problem e.g. nginx / ingress configuration, network access problem, port mapping, name resolution etc.

    • @wesleypacavira570
      @wesleypacavira570 ปีที่แล้ว

      @@codeching here is my file. its for a college project, but that file is my practice version. please help me link bellow

  • @mdalimran7926
    @mdalimran7926 ปีที่แล้ว +1

    Thanks a lot for your video. Should we build a docker image for client and server then pushed it into dockerhub before cnfiguring the kubernetes yml files?

    • @codeching
      @codeching  ปีที่แล้ว +1

      You're welcome! Inside Kubernetes manifest files you should use docker repository urls e.g. in deployment image. So yes, you have to push your images to some docker repository.

    • @mdalimran7926
      @mdalimran7926 ปีที่แล้ว +1

      @@codechingThanks a lot man. You did a great project for us. Now I have a clear idea about how to deploy a multi container app on kubernetes. Thank once again.

    • @mdalimran7926
      @mdalimran7926 ปีที่แล้ว

      @Codeching I tried to do this project on AWS ec2 and installed minikube cluster there. Could please tell me what exactly I should do to access the app on my browser? Like, I did clone the code on ec2. and run the command "kubectl apply -f k8s" then my pods and all servicess are up and running. The I expose my port and did port forwaring as well. After that I set the inbound rule and allow 3000 port from anywhere. Then only I am accessing the react frontend app. But backend and database is not connected.
      Could you please tell me what extran steps should I do to achive this? Thanks in advance.

  • @rauldeandrade
    @rauldeandrade 3 ปีที่แล้ว +4

    Great and practical video. Thanks. I was really looking for this kind of tutorial. You're the best!

    • @codeching
      @codeching  3 ปีที่แล้ว +1

      You're welcome! :)

  • @khachornchit
    @khachornchit 3 ปีที่แล้ว +2

    Great and thanks. I can run docker-compose successfully but not the k8s. I got an error of "503 Service Temporarily Unavailable" when running with the k8s.

    • @codeching
      @codeching  2 ปีที่แล้ว

      Maybe you have something mistake in your nginx config, but without watching your code it's impossible to tell you what's the problem.

  • @genos2719
    @genos2719 3 ปีที่แล้ว +1

    you can zoom it a bit so that the we can clearly see the codes

  • @PhạmMinhQuang-w9s
    @PhạmMinhQuang-w9s ปีที่แล้ว

    how about using ingress like ingress-nginx. i have an issue that it can not found /static and i can find any solution

  • @dhruvkhullar6153
    @dhruvkhullar6153 3 ปีที่แล้ว +2

    Final code doesn't have nginx folder but is referenced in docker-compose file ? any reason for removing ? is it because you are using Ingress Nginx for k8's ?

    • @codeching
      @codeching  3 ปีที่แล้ว +2

      Yes, exactly. NginX folder was only used in docker compose file. Here in K8s, we are using the NginX Ingress Controller as Loadbalancer. I will remove docker compose file and other docker related files from the final code's repository, because we are not using them. We need docker files only for building our images that we are using later in our K8s manifest files. (for this purpose, you can use the starter project)

    • @Marco-ef5yk
      @Marco-ef5yk 3 ปีที่แล้ว

      @@codeching but if we just have the docker image file for server and client, they will just direct to localhost, right? Do we still need the reference to the Nginx in both server and client docker images if we want to deploy to the cloud? Maybe I miss something :)

    • @stylerHUN
      @stylerHUN 3 ปีที่แล้ว +2

      @@Marco-ef5yk Nginx configurations in docker was used in my previous tutorial when we've run the arthitecture with docker. Here we are using Nginx Ingress Controller as loadbalancer, so we are configuring everything in Kubernetes.

    • @stylerHUN
      @stylerHUN 3 ปีที่แล้ว +2

      @@Marco-ef5yk The other thing is that we used nginx for different purposes. So for serving the static HTML as an HTTP server we used NGinx too. Check my previous tutorial about docker.

  • @sou123456100
    @sou123456100 9 หลายเดือนก่อน

    Thanks for the video, but after deploying all the yml file , it is not opening in localhost
    and I also check pod , service, ingress running also check the log, unable to find solution

  • @raffaelrameh14
    @raffaelrameh14 ปีที่แล้ว +1

    Great video! Thanks a lot!

  • @khurshidismoilov3711
    @khurshidismoilov3711 2 หลายเดือนก่อน +1

    Just master

  • @hmonsalv
    @hmonsalv 3 ปีที่แล้ว +1

    Very practical video, thanks a lot!

    • @codeching
      @codeching  3 ปีที่แล้ว

      You're welcome! :)

  • @alessior5884
    @alessior5884 3 ปีที่แล้ว +1

    Hello, I have a question. When the frontend calls /api/... is the Ingress the one who dispatches the request to the appropriate service?

    • @codeching
      @codeching  3 ปีที่แล้ว +2

      Hello, yes, the Ingress load balancer is in front of everything.

    • @codeching
      @codeching  3 ปีที่แล้ว +1

      I define it at 21:09

    • @alessior5884
      @alessior5884 3 ปีที่แล้ว

      Thank you

  • @himansusekharmishra5114
    @himansusekharmishra5114 2 ปีที่แล้ว +1

    Thank You for this Nice video. I have a requirements that I need not to expose the backend URL from the browser(ingress) and only it can accept the request from the frontend. Because by calling the URL/api it is directly calling the backend. Please help on this.

  • @drhollow_on_hogwarts8778
    @drhollow_on_hogwarts8778 ปีที่แล้ว

    since we are running this in local , can we set the clusterIP to localhost ?

  • @dudiavraham2074
    @dudiavraham2074 2 ปีที่แล้ว

    if we congifure nginx ingress controller on K8s . Then why do we need Nginx+conf file in the react image ?

  • @herbertk9266
    @herbertk9266 3 ปีที่แล้ว +2

    Thank you, you've got another subscriber, but next time try to zoom in for more visibilty

    • @codeching
      @codeching  3 ปีที่แล้ว

      Ok, thank you! :)

  • @hritvikmathur2990
    @hritvikmathur2990 9 หลายเดือนก่อน

    application not running on local host

  • @afshaarahmed2114
    @afshaarahmed2114 2 ปีที่แล้ว

    How i can deploy my local multiple containers of Dockers to Kubernetes?

  • @abhiramsatpute
    @abhiramsatpute 2 ปีที่แล้ว +1

    Amazing video! It would be more helpful for beginners like me if you could mention which key-value pairs in the yamls (especially postgres) can be customized and which were kubernetes specific terms.

    • @codeching
      @codeching  2 ปีที่แล้ว +1

      Thank you for your suggestion! Next time if I create a similar video I will do it.

    • @codeching
      @codeching  2 ปีที่แล้ว +1

      If you haven't subscribed yet, please subscribe to my channel, thank you so much! :)

    • @abhiramsatpute
      @abhiramsatpute 2 ปีที่แล้ว +1

      @@codeching awesome! Already subscribed 😊

  • @estebanmejia9989
    @estebanmejia9989 2 ปีที่แล้ว +1

    Great tutorial, thanks a lot

  • @alierbay352
    @alierbay352 2 ปีที่แล้ว

    Don't we need a Persistent Volume somewhere to be able to do PVC for it? We request 1GB of space but space from where exactly? Did I miss something?

    • @codeching
      @codeching  2 ปีที่แล้ว +1

      In postgres deployment we define the volume in row 15. and we point this volume to our PVC. In this deployment file we also set this defined volume in volumeMounts section where we point to the volume which will point to the PVC. This is the actual setting chain :)

    • @alierbay352
      @alierbay352 2 ปีที่แล้ว +1

      @@codeching Thank you for the reply and the videos

  • @mib8254
    @mib8254 2 ปีที่แล้ว

    Thank you for your awesome job.
    How can have react hot reload on nginx for development purpose?

    • @codeching
      @codeching  2 ปีที่แล้ว +1

      For this purpose I could recommend a simple docker solution, so without kubernetes just on dev machine. In my old video I describe it that how CHOKIDAR_USEPOLLING works. You can check it here: th-cam.com/video/8C15cxMcM9E/w-d-xo.html
      With this switch, you can tell that if React source code changes then reload the app inside the docker container too.

  • @mkl31337
    @mkl31337 2 ปีที่แล้ว

    I get ERR_EMPTY_RESPONSE when im entering localhost

  • @herbertk9266
    @herbertk9266 3 ปีที่แล้ว +1

    Thank you

    • @codeching
      @codeching  3 ปีที่แล้ว

      You're welcome! :)

  • @lahwfsk167
    @lahwfsk167 3 ปีที่แล้ว +1

    very great content, keep up

    • @codeching
      @codeching  3 ปีที่แล้ว

      Thank you! :)

  • @mohamedyoussef8835
    @mohamedyoussef8835 ปีที่แล้ว +1

    Awesome videos ++++++++++ 🙂

    • @codeching
      @codeching  ปีที่แล้ว

      Thank you! :))

  • @ashimov1970
    @ashimov1970 ปีที่แล้ว +1

    Laslo, your content is awesome but your English has to be improved, at least your pronunciation and spelling

    • @codeching
      @codeching  ปีที่แล้ว +1

      I know. Slowly I improve it I think because the usage of English is my daily routine at my company on workshops etc... I don't think that there is better way to improve it, but the main thing is that the audience can understand my videos and it seems that they are. :) Thank you for your feedback!

    • @ashimov1970
      @ashimov1970 ปีที่แล้ว

      @@codeching sure 🤝

  • @musashi542
    @musashi542 8 หลายเดือนก่อน

    i hate kubernetes from the bottom of my heart .