This guide contains all the necessary steps to install Kubernetes on your machine.
You can install Docker
using the official guide or by running the official convenience installation script.
Run these commands to download and execute the installation script.
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Once the installation is complete, start the docker service with sudo systemctl start docker
💡 If you want Docker to run every time you start your computer, run
sudo systemctl enable docker
If your installation was successful, you should be able to run the following command without any issues.
docker run hello-world
Depending on how you installed Docker, you might have to prefix all docker commands with sudo
as shown below.
sudo docker run hello-world
If you're unable to install Docker, you can alternatively use podman which works just like Docker. To use podman, simply replace docker
by podman
in every command that you run as shown below.
podman run hello-world
You can install Minikube
using the official guide through binary download.
If your installation was successful, you should be able to start a cluster using the following command. It will start a local Kubernetes cluster on your machine.
minikube start
If you failed to install minikube, you can use kind instead by following this guide.
You can install kubectl
using the official guide through binary download.
Make sure you setup kubectl bash autocompletion too!
If you're on zsh, you can run the following command to enable the autocompletion.
source <(kubectl completion zsh)
Once that's done, you can go back to the exercises page!