Now that we have a cluster deployed with three nodes and a deployment with varying number of pods, let's look at how to expose these pods so we can access our application. Kubernetes services are exposed by using a load balancer. Load balancing allows your cluster services to be available on a single IP address. In Kubernetes, you create internal load balancers, which make it easier for you to expose your services between GCP applications, if needed.
For our exercise here, exposing the deployed pods to the internet is easy. If you noticed, we had deployed the nginx images as our workloads. Let's look at exposing this to the internet so we can access our pods:
- Open up your workload and click on Expose:
- You will see the next screen that allows you to map an external port to an internal port. This internal port is the port your application...