Kong Gateway Tutorial | API Gateway For Beginners

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • Hello! Today's video is a short tutorial on what an API Gateway is and how to set one up with Kong Gateway. Gateways are very useful when it comes to production applications so it's a great thing to understand the basics about. Hope you enjoy and happy holidays!
    Useful Links:
    GitHub: github.com/red...
    Kong Gateway: konghq.com/kong/
    Kong Plugins: docs.konghq.co...
    Music:
    • Desync
    Huge thank you to Harris Heller for providing copyright free music.
    ▬▬▬▬▬
    Hey everyone! My name is Redhwan Nacef (Red for short). In this channel, I'm hoping to share my thoughts on software engineering, coding, management, and all things tech. I hope you enjoy!

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

  • @allochi
    @allochi 3 года назад +21

    Redhwan, This is wonderful! one of the best 10 minutes I have ever spent on RUclips, you also have good style and flow of ideas, thanks a lot.

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

      Wow, thanks a lot for that feedback, appreciate the comment! 🙂

  • @ffatheranderson
    @ffatheranderson 3 года назад +3

    Wow, I did not know that intellij idea has such a convenient way of execution of HTTP requests. I am about integrated HTTP client. THank you. :)

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

      Yes it's very useful. You're welcome.

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

    you deserve more than 728 ,, i am 729 keep it up plz ! Thanks for existing brother Redhwan

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

      Really appreciate the awesome feedback. I will do! Thank you.

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

    nice video. it helped me a lot, when I first started with kong.
    From Vietnamese. Thanks

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

      Great to hear, thank you for the feedback!

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

      How you run Kong so far?

  • @Skyler9604
    @Skyler9604 11 месяцев назад

    Thank you for this! I looked all over for an easy to understand beginners guide to Kong and this was my saving grace.

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

    Nice! I was using the wrong host in my Kong configuration, I was telling it to proxy requests to "localhost", but that would be the localhost of my Kong container, the right host to communicate with a service in my machine would be the host.docker.internal. It works! Cool

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

      Docker network vs host network always gets me! Glad you got it working.

  • @papa.pandey
    @papa.pandey 3 года назад +4

    Simple and easy to understand !

  • @DallinHitchcock
    @DallinHitchcock 3 года назад +4

    This is great, super simple and easy to understand. You helped get me started, thanks for making it bro

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

    This is really helpful for beginners . Thanks 👍

  • @andystoica1481
    @andystoica1481 Год назад +1

    Short and sweet! Thanks for sharing.

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

    Simple and easy to understand.

  • @StanleySathler
    @StanleySathler 6 месяцев назад

    Crystal, thanks Redhwan! Short and straightforward

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

    Thanks Redhwan, very nice tutorial

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

    Liked the video very much...cool thanks

  • @jean-donaldroselin3871
    @jean-donaldroselin3871 8 месяцев назад

    Vidéo super bien faite et instructive.
    Merci

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

    Fantastic into demo, thank you.

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

    Thank you very much!

  • @lakshman200
    @lakshman200 Год назад +1

    Thanks for the video!!!!

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

    Thank you so much.

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

    This was so good. thanks alot

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

    Thanks a lot. Excellent.

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

    Good stuff man

  • @RaphaelKONG
    @RaphaelKONG 7 месяцев назад

    Nice intro

  • @anthonyjones3345
    @anthonyjones3345 Год назад +1

    Good vid. Please make your audio at the same volume as the outro music.

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

    Nice tutorial. Atm i have a project running an Ecommerce site using event-driven microservice using nats streaming server and ingress-nginx controller. I have auth as an separate service and the frontend requests auth and then communicate with the other services through cookie auth that every service has. I'm not sure how api gateway/kong fits into this but it would make handling rate limiting and i guess security easier to maintain ?.

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

      Thanks! Yea thats the right idea, in theory kong would do a similar job to ingress-nginx controller in terms of routing/load balancing, as well as auth like you mentioned via plugins too.

  • @trungbuichi7864
    @trungbuichi7864 Год назад +2

    Hi Redhwan, thanks for the robust, easy-to-understand video. I just have one question. Is it possible to extend Kong Admin API using Go similar to what the Kong documentation mentions when developing a custom plugin using Lua? Go PDK seems doesn't support many things that Lua PDK does.

    • @RedhwanNacef
      @RedhwanNacef  Год назад

      Hi, thanks! Yes I have another video on my channel on how to create a plugin with Go, that might help you get started.

  • @akanimohosutuk928
    @akanimohosutuk928 Год назад +1

    Dope

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

    Thanks!

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

    Nice video 👌 how can I backup the services, routes and API Keys created???

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

      Thanks! Not sure what you mean by backing them up? The services and routes are in the config file which should be checked into source control so will always be repeatable. The API keys will be handled by the plugin, and stored either in a db or in memory. Is this what you mean?

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

    thanh you bro

  • @raselhossain8855
    @raselhossain8855 Год назад

    Hey brother can you please make a crash course on kong?

    • @RedhwanNacef
      @RedhwanNacef  Год назад

      I haven't used Kong in a while, but might revisit in the future. Will note this down!

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

    can you please create playlist with kong konga prometheus grafana and keyclock , it will be the top hit because there is no tutorial for this epic stack not even in medium and Udemy

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

      I have prometheus/grafana on my to do list, so will try get to them soon. Will look into the other ones you mentioned too, thanks!

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

    Thanks for your help, i'd like to ask you about something when I send request sometime access and return response and sometime request fail and return response 500 error in staging but working on local fine, can you please tell me what is issue in Kong api gateway or middle for kong.
    Thanks in advance

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

      You're Welcome, I can't think of any obvious reason for the issue. Unfortunately it would be really difficult to think about the issue without context/a reproducible example. Happy to try help if you can provide that.

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

    Hi Redhwan, I am trying to learn Kong lately. I've tried the steps here and I can successfully call the Kong Admin API as well as the gists service, but when I call hello service I am encountering error "An invalid response was received from the upstream server"

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

      how to configure or add upstream url/server? Is it on kong.yml ?

    • @RedhwanNacef
      @RedhwanNacef  3 года назад +3

      Hey, It's hard for me to figure out exactly the issue without debugging, but one cause could be the hello service is not running. You need to run this separately using deno: "deno run --allow-net ./hello-service.ts". Maybe try this and see if that helps?

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

      @@RedhwanNacef Now it works! You're a genius Redhwan! Thank you so much!

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

      @@RedhwanNacef Now I am encountering the error again, but this time I am trying to create a Kong API Gateway for my Laravel APIs. Do you have an idea to resolve this upstream error? Thanks.

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

      The only thing I can suggest is to make sure your restart the docker container so it pick up the changes to the config? (And worth double checking the api I working fine without Kong).

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

    Idk if this works. Kong always posts back a not found even for the gists call. I see everything correctly when I do /services

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

      Lol alright just pay attention. The url for the api calls is localhost:8000 and the admin stuff is localhost:8001

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

      I make this kind of mistake far too often!

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

    I have a query in this, where is deno server running ?

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

      Good question, I should have made that more clear. You can run the deno service locally by running: "deno run --allow-net ./hello-service.ts".

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

    Is it working ?, I have tried out multiple times, it didn't work

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

      docker-compose up
      Creating network "kong-gateway_default" with the default driver
      Pulling kong (kong:latest)...
      latest: Pulling from library/kong
      0a6724ff3fcd: Pull complete 274efec6805c: Pull complete 87d5cdce85c4: Pull complete 83d64491ed12: Pull complete Digest: sha256:255db29e37ed7db52d0599252e635e6757480b28ea3b0973d535813fec153297
      Status: Downloaded newer image for kong:latest
      Creating kong-gateway_kong_1 ... error
      ERROR: for kong-gateway_kong_1 Cannot create container for service kong: status code not OK but 500:  ˙˙˙˙  FDocker.Core, Version=3.0.2.51106, Culture=neutral, PublicKeyToken=null Docker.Core.DockerException ClassNameMessageDataInnerExceptionHelpURLStackTraceStringRemoteStackTraceStringRemoteStackIndexExceptiWatsonBuckets  System.Collections.IDictionarySystem.Excepti  Docker.Core.DockerException Filesharing has been cancelled
      When i run docker-compose up i am getting the above the error

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

      Hey, I have tried again and seems to be working fine. From your logs looks like there might be issues with the file sharing, can you try update the file sharing config to make sure docker has access to the directory that contains the work? (Maybe this stackoverflow.com/a/60814428/5041141)

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

    nice video, github repository throws 404 error

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

      Thank you. Oops, thanks for letting me know, updated the link so should be working now.

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

      @@RedhwanNacef One question, do you have a more complete tutorial on Kong DB-Less?
      I'm trying to find kong tutorials with docker and kubernetes implementations

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

      I'm afraid not, I only did this introductory tutorial. I used the Kongs documentation as a reference, not sure if that has what you are looking for (docs.konghq.com/kubernetes-ingress-controller/1.1.x/guides/overview/)? If there is specific problem you are trying to tackle feel free to let me know and I might be able to help to look into it.

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

      @@RedhwanNacef those 3 tools that I'm trying to use for an implementation, which I'm not used to, Kong will be used as a load balancer and API Gateway manager to the different containers distributed on specific servers.

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

      I am looking into doing a tutorial on this topic at some point, but it might take a bit longer as there are a few moving parts. Until then, if there is something specific, I can try help out but it will take a lot longer for a general high level solution. Hope that's okay!