A simple script to bootstrap a kubernetes cluster based on kind and docker.
Kind uses Docker to create cluster nodes. To install docker, please refer to: https://docs.docker.com/get-docker/
$ git clone https://github.com/abousselmi/k8s-kind.git
$ cd k8s-kind
$ sudo ./k8s-kind.sh -m startUsage: ./k8s-kind.sh OPTION COMMAND
Options:
-m bootstrap a multi node cluster
-s bootstrap a single node cluster
Commands:
start setup kubernetes cluster
stop remove the current cluster
help print usage
Example:
To bootstrap a multi node ckuster, you can do:
sudo ./k8s-kind.sh -m startπ₯ 07:14:21 PM[INFO] start bootstrapping..
π₯ 07:14:21 PM[INFO] check dependencies..
π₯ 07:14:21 PM[INFO] 'curl' is installed, continue..
π₯ 07:14:21 PM[INFO] 'docker' is installed, continue..
π₯ 07:14:21 PM[INFO] 'kind' is already installed, continue..
π₯ 07:14:21 PM[INFO] 'kubectl' is already installed, continue..
π₯ 07:14:21 PM[INFO] enable 'kubectl' autocompletion
π₯ 07:14:21 PM[INFO] create kubernetes cluster 'k8s'
Creating cluster "k8s" ...
β Ensuring node image (kindest/node:v1.17.0) πΌ
β Preparing nodes π¦ π¦ π¦
β Writing configuration π
β Starting control-plane πΉοΈ
β Installing CNI π
β Installing StorageClass πΎ
β Joining worker nodes π
Set kubectl context to "kind-k8s"
You can now use your cluster with:
kubectl cluster-info --context kind-k8s
Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community π
π₯ 07:15:15 PM[INFO] specify the cluster 'k8s' as the current context for kubectl
Kubernetes master is running at https://127.0.0.1:32771
KubeDNS is running at https://127.0.0.1:32771/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
π₯ 07:15:16 PM[INFO] Update kubernetes config ownership
π₯ 07:15:16 PM[INFO] finished in 55 seconds.MIT