Kong Gateway Tutorial | API Gateway For Beginners

Поділитися
Вставка
  • Опубліковано 10 вер 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 UA-cam, 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.

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

  • @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?

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

  • @StanleySathler
    @StanleySathler 6 місяців тому

    Crystal, thanks Redhwan! Short and straightforward

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

  • @andystoica1481
    @andystoica1481 Рік тому +1

    Short and sweet! Thanks for sharing.

  • @mickyballadelli7985
    @mickyballadelli7985 2 роки тому +1

    Thanks Redhwan, very nice tutorial

  • @janhavichaudhari767
    @janhavichaudhari767 3 роки тому +1

    Simple and easy to understand.

  • @westernghatsdairy9444
    @westernghatsdairy9444 2 роки тому +3

    This is really helpful for beginners . Thanks 👍

  • @vbisbest
    @vbisbest 2 роки тому +1

    Fantastic into demo, thank you.

  • @kingvic_
    @kingvic_ 3 роки тому +2

    Thank you very much!

  • @lakshman200
    @lakshman200 Рік тому +1

    Thanks for the video!!!!

  • @hamidsafe438
    @hamidsafe438 2 роки тому +1

    Liked the video very much...cool thanks

  • @jean-donaldroselin3871
    @jean-donaldroselin3871 8 місяців тому

    Vidéo super bien faite et instructive.
    Merci

  • @dapobelieve
    @dapobelieve 2 роки тому +1

    This was so good. thanks alot

  • @TechPuzzle_Haven
    @TechPuzzle_Haven 3 роки тому +1

    Thanks a lot. Excellent.

  • @pvelife
    @pvelife 2 роки тому +1

    Thank you so much.

  • @jamesward2946
    @jamesward2946 3 роки тому +2

    Good stuff man

  • @akanimohosutuk928
    @akanimohosutuk928 Рік тому +1

    Dope

  • @anthonyjones3345
    @anthonyjones3345 Рік тому +1

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

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

  • @zakariachahboun
    @zakariachahboun 3 роки тому +1

    Thanks!

  • @qianliu624
    @qianliu624 3 роки тому +1

    thanh you bro

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

  • @RaphaelKONG
    @RaphaelKONG 7 місяців тому

    Nice intro

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

  • @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?

  • @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!

  • @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!

  • @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!

  • @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!