Kubernetes Kind —Dockerized K8S Package
Table of contents
Docker Installation
- Ubuntu 22.04
sudo apt update && sudo apt install -y apt-transport-https ca-certificates curl software-properties-common && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \ sudo apt update && \ sudo apt install -y docker-ce && \ sudo apt install -y docker-compose && \ sudo usermod -aG docker ${USER} && \ su - ${USER}
Kind Installation
Kind installation
version=$(curl -sL https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq '.tag_name' | sed 's/"//g') curl -Lo ./kind https://kind.sigs.k8s.io/dl/$version/kind-linux-amd64 chmod +x ./kind sudo mv ./kind /usr/local/bin/kind
Creating new k8s cluster
kind create cluster --name cluster1
kubectl
installationcurl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
Test cluster
kubectl cluster-info --context kind-cluster1