Getting started
Kubernetes is the go-to platform for managing containerized applications at scale. However, for beginners, it can feel overwhelming. In this series, weβll walk through how to install Kubernetes locally, deploy some applications, and explain how Kubernetes works. We assume you have some experience with containers, but no prior Kubernetes knowledge is required. We'll start by setting up our system and installing Kubernetes. While the upstream version of Kubernetes can be complex and difficult to install, there are lightweight Kubernetes distributions available that can be set up with just a single command. Don't worry β in upcoming articles, weβll also dive into what Kubernetes is and what it actually does.
Installing Kindπ
Kind is a tool for running local Kubernetes clusters using Docker container βnodesβ. Kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI. Kind is what we refer as easy to install local kubernetes. You need docker, podman or nerdctl and Go 1.17+ installed on system.
- Go to github releases of kind
- Select appropriate version for your system generally on normal devices it's amd64, for Raspberry pi it arm64 and for MacOS it's darwin-arm64(only for M seriers chips)
- Download the binary, make it executable and move it in
/usr/local/bin - You can also run below commands for quick installation. copy it into your terminal and kind will be installed
- Try running
kind versionfor checking successful installation
Creating kind clusterπ
Before creation of cluster kubectl needed to be installed on system so that you can run commands necessary. To install kubectl follow official guide
To create kind cluster run command kind create cluster which will create cluster with name kind and will take some time. After completion you may get output like following
$ kind create cluster
Creating cluster "kind" ...
β Ensuring node image (kindest/node:v1.32.2) πΌ
β Preparing nodes π¦
β Writing configuration π
β Starting control-plane πΉοΈ
β Installing CNI π
β Installing StorageClass πΎ
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Have a nice day! π
Verify the cluster info with kubectl cluster-info --context kind-kind. You will below output. Your urls may look different
Note
For our convinience we will set shortcut to kubectl as kc. Open .zshrc or .bashrc in your favourite editor and type alias kc="kubectl"