From the course: Kubernetes: Microservices

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Examine a LoadBalancer service

Examine a LoadBalancer service - Kubernetes Tutorial

From the course: Kubernetes: Microservices

Examine a LoadBalancer service

- [Instructor] You've deployed and queried a cluster IP and node port, and now I'll show you the load balancer service. We'll be working with this file called frontend-ui.yaml. I'm going to talk you through this. When we apply this file, we're going to create a new namespace called frontend. Then you will create a deployment that will spin up three pods called the frontend-ui, and they'll be pulling from this image. This is what we talked about a little bit earlier. You'll see this is the DNS name of the learning service. And then finally, and most importantly, the service. The service is called frontend-service. It lives in the frontend namespace. It's fronting pods that have the label app, frontend-ui, and it is a type LoadBalancer. Let's apply this and see what happens. Run the command kubectl apply -f frontend-ui.yaml All right, it says namespace, deployment, and service was created. Let's look at the service in this namespace. So kubectl gets service from the namespace frontend…

Contents