ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

Build an API Gateway with Envoy and use with .NET Core APIs

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ค. 2024
  • In this step by step tutorial I take you through how to set up Envoy as an API Gateway and run it in Docker Compose with two .NET Core APIs. Specifically, the 2 API Gateway use cases we’ll cover are:
    • HTTP Routing
    • TLS / HTTPS Termination
    Level: Intermediate
    📕 My Book: www.apress.com/gp/book/978148...
    🤩 Patreon Site (Exclusive Member Benefits!): / binarythistle
    💻 GitHub Repo: github.com/binarythistle/S03E...
    🔗 WSL Install: docs.microsoft.com/en-us/wind...
    🔗 Installing Docker in WSL: docs.docker.com/docker-for-wi...
    🔗 Envoy Documentation: www.envoyproxy.io/docs/envoy/...
    💻 Microsoft eShopOnContainers Project: github.com/dotnet-architectur...
    🔗 Dockerize a .NET Core App : docs.docker.com/engine/exampl...
    🔗 Envoy Reporting with Prometheus: • Setting up Prometheus ...
    Recommended Videos
    📽️ Full API Tutorial: • .NET Core 3.1 MVC REST...
    📽️ Running .NET Core apps with HTTPS: • Run ASP.NET Core 3.1 A...
    📽️ Deploy .NET Core API with Docker: • Deploy a .NET Core API...
    ⏲️ Time Codes ⏲️
    PART 1 - INTRODUCTION
    - 2:25 Course Overview
    - 6:00 Architecture
    - 8:02 Demo
    PART 2 - THEORY
    - 11:00 Ingredients
    - 11:47 What is an API Gateway?
    - 18:10 What is Envoy?
    - 19:47 How Envoy works?
    PART 3 - API / SERVICE SETUP
    - 20:47 API Set Up
    - 27:54 Dockerize our APIs
    - 30:35 Configure for HTTPS - Certificates
    - 35:30 Configure for HTTPS - User Secrets
    - 42:07 Docker Compose Setup
    PART 4 - ENVOY HTTP ROUTING
    - 53:38 Get started with Envoy (Default Config)
    - 1:06:48 Run Envoy in Docker Compose
    - 1:11:37 HTTP Routing & Envoy.yaml
    - 1:16:12 Docker Compose Networking
    PART 5 - ENVOY & HTTPS/TLS TERMINATION
    - 1:23:27 HTTPS/TLS Termination Overview
    - 1:26:25 Remove HTTPS Redirection (from 1 API)
    - 1:27:14 Generate Certificates for Envoy using OpenSSL
    - 1:33:34 Configure HTTPS/TLS Terminaiton in Envoy
    - 1:41:06 Configure end to end HTTPS in Envoy
    PART 6 - WRAP UP
    - 1:47:05 Final Thoughts
    - 1:48:47 Supporter Credits

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

  • @JoeFrixon
    @JoeFrixon 4 ปีที่แล้ว +5

    Just starting to watch but the initial explanation itself requires a thumbs up. Happy to be here.

  • @user-ux1mj1uz5b
    @user-ux1mj1uz5b 3 ปีที่แล้ว +4

    Thank you so much Les Jackson. It's good to find someone like you who explains almost everything, if not everything, in a tutorial. I learned a lot.

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

    Great as usual!!! Went through it and now its time for some practice. 👏👏

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

    Very well laid out tutorial. Actually looking for this kinda tutorial. Thanks. Very informative.

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

    Thank you, Les. Another great video. Greetings from Serbia.

  • @peymanGhaderkurehpaz
    @peymanGhaderkurehpaz 3 ปีที่แล้ว +34

    Thanks Less , your tutorials are amazing , I just enjoy and love to watching them till the end. I loved it.
    I would like to ask you if it is possible make another tutorial for your next videos and secure these two microservices with a single Auth service and maybe I ask too much but if you also include roles and permissions in it , then it would be great.

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

    Just stumbled across this walk-through! Now I need to check out your other ones to see what I missed! Thanks!

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

    Salute to you Les Jackson for such a great effort to contribute to IT, I'm loving it going to implement at work place :)

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

    Great tutorial. Really taking your time to explain and very hands-on. I certainly will check out your other videos. Definitely keep it up

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

    Thank you so much Mr. Les , you are simply great, I love the way you explain very smoothly,

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

    Before I keep watching, just gotta say, I loved that intro lol

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

    Thanks a lot Les !! Your videos are excellent!!
    Really helped me a lot on Envoy and API Gateway with .Net Core

  • @raouftoumi6669
    @raouftoumi6669 4 ปีที่แล้ว +2

    Thanks Les for this amazing tutorial

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

    Nicely done, Wes!

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

    Thank you so much for taking time to create these amazing tutorials! A+mazing Channel!

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

    Awesome man....watching this video at midnight and completed...:)

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

    in love with the channel, keep up the good work! :)

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

    Great course , Thank you so much Mr. Jackson

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

    Thank you Les for another amazing tutorial during our lockdown in Melbourne. I'm currently investigating Ocelot for the API gateway and you have given me another option to think about it.

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

      Hi Ray, yeah the Microsoft eShopOnContainers reference architecture that I mention in the video originally used Ocelot, (I've not personally used it), but they then switched to Envoy, (not sure why but it does seem to be gaining ground). Anyway thanks for the feedback and I hope your lock-down is going ok! Cheers, Les

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

      @@binarythistle From what I know envoy supports grpc which was needed for eShopOnContainers. Ocelot does not support grpc natively

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

    Thanks boss, I've fallen in love with your wonderful tutorials....

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

      Wow thank you so much my friend! 😊😊😊😊

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

    Thank you for all you work!

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

    Great Video!!
    I agree that the Envoy documentation looks pretty thorough but I find that I often get lost, bump into dead ends and/or get frustrated with the final definitions.
    So your video went a long way towards helping me understand a envoy.ymal file that I have to modify!
    Looking forward to implementing what I’ve learned!!

  • @999CANNO
    @999CANNO 2 ปีที่แล้ว

    Thank you for your tutorials.

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

    You're on a roll!

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

    Thanks Les for this tutorial

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

    Really helpful video - thank you. If you ever get chance, it would be great to compare how to use Envoy as a sidecar proxy, rather than as a front proxy. A lot of the available resources on the web are pretty impenetrable, so it's a topic that would really benefit from your clear presentations!

  • @2005bgva
    @2005bgva 3 ปีที่แล้ว

    Fantastic video, THANKS A LOT.

  • @DanielSebastiaoNet
    @DanielSebastiaoNet 11 หลายเดือนก่อน

    Les, thanks so much to shrare your cotent we us. I really learn a lot with you. Thanks .

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

    Very good video. Thank you very much!

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

    Gracias Mister jackson.....maravillosa información....saludos de Perú

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

    Hey Les Jackson, explanation is awesome, gr8t brother

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

    Amazing content!

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

    Awesome 😎 Thanks Les, in future can you do one on MicroService architecture with .net core

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

    Helped a lot. Thanks :)

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

    Thank you for the great tutorial. It was very helpful. It would be really appreciated if you could make a detailed video about ENVOY.

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

    Awesome video. And Talisker 18 is a great choice.

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

    great video Les, hope to see you on collins street soon :)

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

    Thank you Les !!

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

    Wonderful video your explanations are perfect please keep the wonderful contact coming

  • @Radhakrishna-pq3yj
    @Radhakrishna-pq3yj 4 ปีที่แล้ว +2

    You are my mentor from the beginning. 😎 I really appreciate your work . Can I get ML.Net based some tutorials too from you.. as they way you make things so easy it's just amazing.
    Thanks for everything.. ⛱️ Take care

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

    Great talk ... thanks

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

    The best Thank you so much

  • @ranitdatta505
    @ranitdatta505 3 ปีที่แล้ว +5

    Great tutorial Les..... would be great if you show how to deploy this as production environment in any cloud platform. That would complete any full stack development. Thanks again.

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

      Yes PLease. Will be very helpful to show how to deploy Envoy services with this https support on Azure

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

      @@sayedsaad8426 z kdodhfv5 mm

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

    enjoy api gateway......i like you mention it

  • @ali-asadi
    @ali-asadi 3 ปีที่แล้ว

    Thanks a lot

  • @josh.c3457
    @josh.c3457 3 ปีที่แล้ว +1

    Thank you so much for your content! I've been transitioning from the Java ecosystem to .NET and your videos have been incredibly helpful!

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

    Love these vids. I'd like to see one on how to have a single authenticate/authorise for multiple apis like this.

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

    Les, Thank you very much for a fantastic content.I was looking for this for quite sometime, my tea cluster is showing 'no healthy upstream' i am not sure why, need to investigate, what i have done wrong! YAML is giving tough time!

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

    “And the other ones gonna return.. Can you guess? A random typeof”. I see what you did there

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

    1 thumb up just to cover this topic, just found you, 1 thumb up for this detail and this intro, 1 thumb up for all your videos, 1 thumb up for your nice manner, 1 thumb up for the lenght of the video, 1 thumb up for your time codes , i have more thumbs all for you!!

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

      Wow - a load of thumbs! Awesome thanks!

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

    Hi Les, Thanks for these tutorial videos, egarly waiting for Kubernetes video.
    please make a video on gRPC(c#) webservice with container.
    Thanks.

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

    Very good explanation.
    A bit difficult to follow especially when come to the point of constructing the envoy.yaml file. Lucky you have provide all the repo files on the GitHub. We must very careful the space in the envoy.yaml file. Most of the error happened due to the spacing.
    Well, thank you very much. Really appreciate it.
    By the way, I hope you can have a session for NGINX.

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

    Absolutely fantastic tutorial (along with all your other tutorials!). I love the way you present the content, very informative and descriptive. In this tutorial, I think things have changed with the Envoy documentation as I was unable to find the original envoy.yaml file you used. Of course, I was able to grab a copy from your GitHub page, however it was the 'final' version. I had to go through the yaml file section of the video several times to clean out all the upcoming content. As a recommendation, it may be helpful in future videos if you could include some of the 'starting point' code in cases where you are cutting and pasting. Even after I stripped out and reverted your 'final code' back to 'original code' as best I could, I ran into an 'Invalid path: /etc/ssl/certs/https.crt' error when trying to start up the Envoy container (so I am guessing I still missed something). Otherwise, I absolutely loved the tutorial, and look forward to learning much more from your channel. Thank you!

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

      Hah, so what I missed in fact was just rebuilding the container after reverting back to the original yaml. Works fine now.

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

    Hello Sir really happy to see the videos, thanks for all your efforts. I have a request can you make video on best practices /architecture/design patterns if possible?

    • @binarythistle
      @binarythistle  3 ปีที่แล้ว +6

      Hi Saurabh, my focus over the coming months will be more on microservices, so will hopefully cover this off for you!

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

      @@binarythistle ❤️❤️❤️❤️

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

    It would be great if you could create another video about smth. from front-end freamwork - for example Angular. I saw in one of your video that you have extension for that, so maybe couse you're familiar with that. I mean not big deal, just simple communication between api and webpage with security stuff etc. Consider that :) and like always very good material, thank you for your job.

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

    Thanks a ton for the video, i was trying to use Envoy but the doc is really round n round all over the place.

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

    Les, it's not just you on the Envoy documentation ... ;-)

  • @2007gtsc
    @2007gtsc 3 ปีที่แล้ว

    Great video! Does you book cover the parent/child relationships?

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

    envoy... onvoy... dayta.... darta.... meh. I interchange and I haven't worked out why... AND - just watching flights land in Sydney from Melbourne - I'm a little more emotional about it than I thought I would be! Welcome back! Hope you survived the last few months ok.

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

    Thanks for excellent videos. I have a query related to the architecture at 7:50 timeline. If I want to add load balancer to scale microservices then do I have to add load balancer between api gateway and microservices. So api gateway would route request to load balancer and load balancer would distribute the request to microservice api.

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

    Hey ​ Les, how do you get communications between services?

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

    Great tutorial, I have learned so much today. I have a question, If I have two services running on / how would one configure envoy to mount these on different path prefixes like /service1 and /service2 ?

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

    Noob question here, is Envoy really a must go instead of Ocelot?

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

    Does envoy support to show swagger documentation (with swagger UI) for all the backend APIs?

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

    Thank you very much Les for this great tutorial and explanation of API gateways! I really would be interested in using free automatically refreshing letsencrypt certificates with Envoy. But it seams that this is not an easy task. Maybe its possible with "SDS". What do you think?

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

    Hi Les, Thanks for this amazing video, I have question or I would say confusion as at last of the video you told about envoy service mesh, I can understand service mesh is for internal traffic and API gateway is for external but my question is can we use both together , what is best practices for this? My another question is for Authentication part, if I can configure authentication on envoy? if yes again whether it should be at service mesh or at gateway?
    Thanks for all your handwork, I enjoyed watching your video. whenever you get a chance please clarify my doubt. Thanks

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

    Hi Les,
    Thanks for Nice and amazing Tutorials.
    At this lesion , use of envoyproxy as API-Gateway is wonderful.
    I am thinking on can we replacing "envoyproxy " by "Azure-API mgmt " services and do the same task(URL base routing) ?
    Thanks,

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

    How do you access the mounted data within the dockerfile? I haven't been able to see the data in the volume and access the data there.

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

    I want a demo about .NET Core3.1 & EF with Oracle,It would be appreciated if you could post one on Git

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

    I have small change in api gateway is my services like Flights api so i have to consume all apis in same time then entry point of access flight is api gateway so how can achieve this with api gateway? Thanks for video

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

    How do authentication and authorization in the Envoy API gateway in microservice?

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

    Can you use Envoy when your API is GraphQL? probably not since there's only one endpoint and you need to route it according to what's in the body. Is there an alternative? or do you just create your own gateway with stiching\merging?

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

    Why do you use Openssl for Envoy but dotnet certmanager for the services?

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

    Would mind doing a microservice course

  • @youtube.com-handle
    @youtube.com-handle 3 ปีที่แล้ว

    i will save this to my FW collection

  • @av7758
    @av7758 6 หลายเดือนก่อน

    Hi Les, request you to re-make or update the video with latest version of .Net Core and envoy. I have been trying since days but unable to configure project on SSL (localhost)

  • @joe-sydney-au
    @joe-sydney-au 2 ปีที่แล้ว

    Not wanting to rain on the party, great tutorial, etc BUT I still have no idea why would anyone want to use Envoy, as opposed to, for example, just nginx or IIS as a reverse proxy ?
    Please explain what is the benefit / use case ?

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

    Hi, Any chance of doing a video using Azure API management over Envoy ?

  • @h.r134
    @h.r134 3 ปีที่แล้ว

    Can i use nodejs service when i use Envoy?

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

    Why do we need setup certificates for apps when we have one on envoy?

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

    I have a question on how you figured out the names for the secrets? How did you know that the key was "Kestrel:Development:Certificates:Password"? People often brush over the small things, but this is an area that I find difficult. All these magic strings that you have to know in order to get things working ...

  • @HaoNguyen-km9xj
    @HaoNguyen-km9xj 3 ปีที่แล้ว

    Somebody please help me, Does this API Gateway support JAVA Spring Boot API???

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

    Hi Les! When I go to localhost:10000/c I get redirected to envoyproxy.io/c which has a 404 error on the page. Why?

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

      lmao how do you expect anyone to explain that

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

    Can we use envoy without Docker?

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

    What if you don't want to use docker ?

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

    In the end still `localhost:10000/c` redirects to `localhost:xxxx/coffee` and expose the internal service addresses...

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

    I get an error when trusting the dev-cert. Can't trust it. I get no prompt at all. Only "There was an error trusting HTTPS developer certificate."

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

      you may need to clean it up...use the command below.
      dotnet dev-certs --clean

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

      ​@@zulhishamtan4308 I've done that and no luck. Manage to get it working by manually installing the cert using this commands:
      dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p { password here }
      dotnet dev-certs https --trust
      Then importing it to the correct certs folder

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

    Imagine being so liked that you video gets negative dislikes

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

    Super video, just the stack that I have been trying to learn.
    Question:
    At 45:23 your docker-compose file, has the ports mapped for the Coffee API
    ports:
    - "8080:80"
    - "8081:443"
    However internally, the Coffee Api has the following launch settings in
    launchSettings.json :
    {
    ...
    "applicationUrl": "localhost:5001;localhost:5000",
    ...
    }
    I was just wondering why the the docker compose file did not reference the 5001 and 5000 ports - if these are internal?
    Thanks
    Craig

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

    Thanks for the tutorial, it's very helpful. How come it's not possible to route towards one's localhost ? And is there a way to solve this aside from using Docker compose ?