Working with the Kubernetes CLI (kubectl)
When building a containerized application, Kubernetes is a common choice of container orchestrator. For an introduction to Kubernetes, see the Setting up Kubernetes in WSL section in Chapter 7, Working with Containers in WSL. Kubernetes includes a CLI called kubectl
for working with Kubernetes from the command line. In this section, we will deploy a basic website in Kubernetes and then look at different ways to query information about it using kubectl
.
In Chapter 7, Working with Containers in WSL, we saw how to set up Kubernetes on our local machine with Docker Desktop. Here, we will explore setting up a Kubernetes cluster using a cloud provider. The following instructions are for Azure, but if you are familiar with another cloud that has a Kubernetes service, then feel to work with that. If you want to follow along but don't already have an Azure subscription, you can sign up for a free trial at https://azure.microsoft.com/free/.
...