To install and set up Kubernetes on Windows, load kubectl and install minicube. Minicube is a tool that enables us to run a single node cluster in a VM on a machine.
Choco Install Kubernetes-cli Minicube
Now, run the following command and verify that kubectl is installed on your machine:
kubectl.exe version –client
Since we are installing Kubernetes on Windows, use Hyper-V to launch a VM
and set up a Kubernetes cluster on the VM.
This will complete the setup.
Running Kubernetes containers
To start containers, use the Kubernetes command below to create a deployment. Provide a name for the deployment and the container image to deploy.
When a deployment is created, Kubernetes builds pods to host application
instances.
Enter get pods just after running the previous command to catch the Container Creating status as pods are deployed:
kubectl.exe get pods
Use the describe keyword with the deployment name, as shown below, to see more detailed information about deployments:
kubectl.exe get deployment
kubectl.exe to describe deployment helloworld-nginx
In this Kubernetes implementation tutorial, we run only one container or Nginx
server, but sometimes it is necessary to accommodate increased workload and traffic. In that case, scale up the number of application instances. This can be achieved using kubectl scale deployment with a –replicas parameter: