This guide walks you through installing and configuring a local Kubernetes cluster using kind (Kubernetes IN Docker).
Clone the repo:
git clone https://github.com/vanessasara/kubernetes-practice.git
cd k8s-inJust run this file this make sure that your setup is ready to go with Docker, kind cluster and kubectl. Don't worry if docker is not installed it will install automatically.
# Install kubectl (Linux amd64)
./install.shVerify:
kubectl version --client --output=yaml
kind versionUse a minimal single-node cluster or a multi-node config.
kind create cluster --name demoCreate or just run kind-config.yaml:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.33.1
- role: worker
image: kindest/node:v1.33.1
- role: worker
image: kindest/node:v1.33.1Then:
kind create cluster --config kind-config.yml --name k8s-clusterkubectl cluster-info --context kind-k8s-cluster
kubectl get nodesExpected:
NAME STATUS ROLES AGE VERSION
k8s-cluster-control-plane Ready control-plane 1m v1.33.1
k8s-cluster-worker Ready <none> 1m v1.33.1
k8s-cluster-worker2 Ready <none> 1m v1.33.1
🎉 CONGRATS!! you're ready to go with Kind cluster
This guide provides step-by-step instructions for installing Minikube on Ubuntu. Minikube allows you to run a single-node Kubernetes cluster locally for development and testing purposes.
Ensure the following before proceeding:
-
Ubuntu OS
-
sudo privileges
-
Internet access
-
Virtualization support enabled Check with:
egrep -c '(vmx|svm)' /proc/cpuinfo0= disabled1= enabled
Update your package lists to make sure you are getting the latest version and dependencies.
sudo apt updateInstall some basic required packages.
sudo apt install -y curl wget apt-transport-httpsMinikube can run a Kubernetes cluster either in a VM or locally via Docker. This guide demonstrates the Docker method.
sudo apt install -y docker.ioStart and enable Docker.
sudo systemctl enable --now dockerAdd current user to docker group (to use docker without root):
sudo usermod -aG docker $USER && newgrp dockerNow, logout (use exit command) and connect again.
First, download the Minikube binary using curl:
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64Make it executable and move it into your path:
chmod +x minikube
sudo mv minikube /usr/local/bin/Download kubectl, which is a Kubernetes command-line tool.
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"Make it executable and move it into your path:
chmod +x kubectl
sudo mv kubectl /usr/local/bin/Now, you can start Minikube with the following command:
minikube start --driver=docker --vm=trueThis command will start a single-node Kubernetes cluster inside a Docker container.
Check the cluster status with:
minikube statusYou can also use kubectl to interact with your cluster:
kubectl get nodesWhen you are done, you can stop the Minikube cluster with:
minikube stopIf you wish to delete the Minikube cluster entirely, you can do so with:
minikube deleteThat’s it! You’ve successfully installed Minikube on Ubuntu, and you can now start deploying Kubernetes applications for development and testing.