Minikube and Kind are the two recommended by the official Kubernetes website.
Refer this for the comparison between minikube, kind and k3s. Here is a brief description of Kind:
Kind is another Kubernetes SIGs project but is quite different compared
to minikube. As the name suggests it moves the cluster into Docker
containers. This leads to a significantly faster startup speed compared
to spawning VM.For install, refer to https://kubernetes.io/docs/setup/learning-environment/kind/
On Linux, the simple way is to run below to download the single executable:
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64
Change it to be executable and add it to path, all done. If like to learn about the hot 'Go', you can use Go to get it, and even build from source.It has dependency of docker. To install docker: refer to this old post.
Or on Ubuntu, run: sudo apt install docker.io
To play with kind, need to install kubectl:
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
As kind Quick Start mentioned, after kind and kubectl installed, things can be tried are:
Creating a Kubernetes cluster is as simple as
kind create cluster
List your kind clusters:
kind get clusters
Interact with the created default cluster:
kubectl cluster-info --context kind-kind
Delete cluster:
kind delete cluster
Load image to kind-2 cluster:
kind load docker-image my-custom-image --name kind-2
When I try to use my docker image (by running 'docker pull quyq/ifun:v0.3') to create cluster, I got error:
ERROR: failed to create cluster: failed to generate kubeadm config content: failed to get kubernetes version from node: failed to get file: command "docker exec --privileged kind-control-plane cat /kind/version" failed with error: exit status 1
This sounds like the same issue as kind issue 1288. Run kind create cluster --image d7fe9f82ee94 -v 1
shows: cat: can't open '/kind/version': No such file or directory
Per BenTheElder's comment,
snap is in the known-issue document, the snap docker package
has a number of issues, e.g. no access to temp directories. I don't recommend snap for docker
and we don't really support this.
Resolution was to install docker via apt-get detailed on their
page here. But for me I was usng the curl command installed kind, and even upgrade to version
0.8.1 doesn't help. I have no issue to create the cluster with default kindest/node image. By
checking this, turns out I need a customized docker image for kind.
0 Comments:
Post a Comment