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!
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.
Wow, thanks a lot for that feedback, appreciate the comment! 🙂
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. :)
Yes it's very useful. You're welcome.
you deserve more than 728 ,, i am 729 keep it up plz ! Thanks for existing brother Redhwan
Really appreciate the awesome feedback. I will do! Thank you.
Thank you for this! I looked all over for an easy to understand beginners guide to Kong and this was my saving grace.
nice video. it helped me a lot, when I first started with kong.
From Vietnamese. Thanks
Great to hear, thank you for the feedback!
How you run Kong so far?
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
Docker network vs host network always gets me! Glad you got it working.
Crystal, thanks Redhwan! Short and straightforward
Simple and easy to understand !
Thank you!
This is great, super simple and easy to understand. You helped get me started, thanks for making it bro
Thank you, I'm glad it helped.
Short and sweet! Thanks for sharing.
Thanks and no problem!
Thanks Redhwan, very nice tutorial
Thanks! Glad you liked it.
Simple and easy to understand.
Glad you enjoyed it 😊
This is really helpful for beginners . Thanks 👍
Glad it was helpful 🙂
Fantastic into demo, thank you.
Thanks!
Thank you very much!
You’re welcome 😊
Thanks for the video!!!!
You're welcome!
Liked the video very much...cool thanks
Glad you enjoyed it, thanks.
Vidéo super bien faite et instructive.
Merci
This was so good. thanks alot
Thanks, glad you enjoyed it!
Thanks a lot. Excellent.
Thanks, anytime. 😊
Thank you so much.
You’re welcome 🙂
Good stuff man
Thanks
Dope
Thanks!
Good vid. Please make your audio at the same volume as the outro music.
Thanks!
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.
Hi, thanks! Yes I have another video on my channel on how to create a plugin with Go, that might help you get started.
Thanks!
No problem!
thanh you bro
Anytime
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 ?.
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.
Nice intro
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
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.
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"
how to configure or add upstream url/server? Is it on kong.yml ?
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?
@@RedhwanNacef Now it works! You're a genius Redhwan! Thank you so much!
@@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.
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).
Nice video 👌 how can I backup the services, routes and API Keys created???
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?
Idk if this works. Kong always posts back a not found even for the gists call. I see everything correctly when I do /services
Lol alright just pay attention. The url for the api calls is localhost:8000 and the admin stuff is localhost:8001
I make this kind of mistake far too often!
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
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!
Hey brother can you please make a crash course on kong?
I haven't used Kong in a while, but might revisit in the future. Will note this down!
I have a query in this, where is deno server running ?
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".
Is it working ?, I have tried out multiple times, it didn't work
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
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)
nice video, github repository throws 404 error
Thank you. Oops, thanks for letting me know, updated the link so should be working now.
@@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
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.
@@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.
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!