Deploying a Load-Balanced HTTP Application Using Go
Understand how to handle the NGINX deployment of a load-balanced HTTP application with Go.
We'll cover the following
- The code
- Creating a ClientSet
- Creating a namespace
- Deploying the application into the namespace
- Creating the NGINX deployment
- Waiting for ready replicas to match desired replicas
- Creating a service to load-balance
- Creating an ingress to expose our application on a local host port
- Streaming pod logs for the NGINX application
Now that we understand a bit more about the Kubernetes API and the resources exposed by the API, we can move away from kubectl
toward using Go.
In this lesson, we will use Go to do many of the same things we did in the previous section using kubectl
. We will authenticate using our default context and create a namespace. However, we will not stop there. We will deploy a load-balanced HTTP application to our cluster and watch the logs stream to STDOUT
as we make requests to the service.
Get hands-on with 1400+ tech skills courses.