This tutorial demonstrates how to configure an Ingress resource in Google Kubernetes Engine to expose services. It includes writing a YAML template for routing, updating the deployment with Helm, verifying the load balancer address, and testing application endpoints using Postman to confirm successful API integration.
Length 8:09
Captions English (Generated), Spanish (Auto-translated), French (Auto-translated), Korean (Auto-translated), Portuguese (Auto-translated), Vietnamese (Auto-translated) #kubernetes #ingress #gke #yaml #cloud #postman #routing #backend #api #deployment
0:00 So right now we have two node ports set up to 0:04 expose our external services. However, we want to 0:07 actually create a new ingress resource, because behind the scenes, 0:11 Google Kubernetes Engine will automatically provision us a load 0:15 balancer and give us a single IP address that we can use to make 0:19 requests to our entire application, which is what we 0:23 want to do. So to easily accomplish this, let's open up our K8s 0:27 folder, and we're going to add a new file in the 0:30 templates directory 0:31 called ingress.yaml. This will have an 0:35 API version of 0:37 networking.k8s.io/v1. 0:42 The kind will be of type of ingress, and we're gonna have 0:46 some metadata here where we give it a name of sleeper. 0:50 And then importantly, we define the spec with a rules 0:53 section, and then we specify the HTTP 0:57 paths in our application. So go ahead and 1:01 s-specify a paths list here, and we'll specify the 1:04 first path, which will be /reservations, 1:09 and we'll use a wildcard here to direct all traffic to our 1:13 reservation service. We're gonna go ahead and also specify the 1:16 path type as implementation 1:20 specific, which just means Google Kubernetes Engine 1:23 will handle all of the 1:24 routing. 1:25 Back-end section here, we'll have a service, and we're gonna go 1:29 ahead and specify the name of the service, which of course we know for 1:33 reservations, we have our service.yaml where the name is 1:36 reservations. So we'll simply provide the name of the 1:40 reservations service and then provide the port number 1:43 that we're gonna 1:44 access it on. So in this case, it'll be three thousand and four. 1:47 Let's go ahead and do the same thing now for the /auth 1:51 routes in our application. We're gonna go ahead and direct 1:55 them as a implementation specific route. 1:58 In the back end here, we'll have a service with a name of auth
The rest of the transcript is for members.
Sign in