codegurukool.com · Free coding tutorials & online compiler

Home › Kubernetes Tutorial › Kubernetes installation

Kubernetes installation

Set up kubectl and a free practice cluster on your own computer.

Before you start

Windows

  1. Open PowerShell and run winget install Kubernetes.kubectl.
  2. Run winget install Kubernetes.minikube.
  3. Close and reopen PowerShell, then run minikube start.

macOS

  1. Install Homebrew from brew.sh if you do not have it.
  2. Run brew install kubectl minikube.
  3. Run minikube start.

Linux

  1. Install kubectl with your package manager or from kubernetes.io.
  2. Download minikube from minikube.sigs.k8s.io and put it in your PATH.
  3. Run minikube start. Add your user to the docker group if you get a permission error.

Check it works

  1. Run kubectl version --client to see the kubectl version.
  2. Run kubectl get nodes. The node should show Ready.

Other options

If something goes wrong

Example code

kubectl get nodes

Run this code in the online editor

← Kubernetes introductionKubernetes architecture →