KiND - Kubernetes IN Docker - Prerequisites

甄煜
2023-12-01

Install Go:

https://go.dev/dl/
https://go.dev/doc/install

wget https://go.dev/dl/go1.19.1.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version

Install docker using the repository:

https://docs.docker.com/engine/install/ubuntu/

Also you have installed the **kubectl** and in the path, refer to the [docs for installation](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
Verify by running **kubectl version**

Install and Set Up kubectl on Linux:

https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/

curl -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
kubectl version --client

Install Kind on Linux

https://kind.sigs.k8s.io/docs/user/quick-start/

curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.15.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

Install Helm From Apt (Debian/Ubuntu)

https://helm.sh/docs/intro/install/

curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
sudo apt-get install apt-transport-https --yes
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm

Setup Kubernetes Goat

https://madhuakula.com/kubernetes-goat/docs/how-to-run/kind

git clone https://github.com/madhuakula/kubernetes-goat.git
cd kubernetes-goat/platforms/kind-setup
bash setup-kind-cluster-and-goat.sh
kubectl get pods //Ensure the pods are running before running the access script
bash access-kubernetes-goat.sh

Then navigate to http://127.0.0.1:1234

 类似资料: