 What is a service? Your Kubernetes cluster is very likely composed of multiple nodes. When you deploy your application on Kubernetes, you don't know where, in which nodes, the instances of your application will be scheduled. Moreover, an instance might be terminated and be rescheduled to another node, or even an entire node might go down so that everything would be moved to another node. If you can't rely on the IP address of the nodes to reach your application, how is your application accessible through the network? That's why we have Kubernetes services. A Kubernetes service allows you to give a name just like a DNS domain name to your application, and you can use this name to access it. If you have multiple instances attached to the same service, Kubernetes will load balance the request between those instances, and depending on the configuration of your Kubernetes cluster networking, you might have random or round robin load balancing. Let's take a look at how a service works. I already have a deployment here with three instances, and each one of those instances is potentially running a different node in my cluster, which means a different IP address. So let's create my first service. Let's take a look at this YAML file. You can see here that the kind is service and already have a label for my selector, and I'm using a port HTTP port 8080 and the type of my service load balancer. So what happens when I try to apply this YAML file to my cluster? You can see here that the service was created. Let's try to send some requests. Minicube, I'm getting the IP address of my cluster, and now let's Cube CTL get service so I can get the port, and now I'm going to send some curl requests so I can see what's happening. Y or true, the curl, and I'm going to copy the IP and port 31767. Let's leave half a second and done. So now I'm sending some requests to my instances in my deployment. So you can check that the deployment service is load balanced the request through the instance of my deployment. So every time I'm hitting a different pod, you can check here by the end, the hash, the name of the pod, I'm hitting different instances, and every time I hit one of those instances, the counter is being cremated. That's how you know that I'm reaching different ones and incrementing different counter as well. You can also see that right now my cluster is not configured with round robbing load balancing. It's performing random load balancing as I mentioned before. It really depends on the configuration of your cluster. Thanks for watching. Don't forget to like this video and subscribe to our channel.