auto install latest docker && k8s
support CentOS 7+/Debian 9+/Ubuntu 16+
three step to quickly create k8s Cluster
master node run:
# use flannel network
source <(curl -sL https://k8s-install.netlify.app/install.sh) --flannel
or
# use calico network
source <(curl -sL https://k8s-install.netlify.app/install.sh) --calico
it will init master node and create 'kubeadm join xxx' command
slave node run
source <(curl -sL https://k8s-install.netlify.app/install.sh)
slave node run first step left command 'kubeadm join xxx'
u can also set machine hostname by pass '--hostname xxx' param, for example:
source <(curl -sL https://k8s-install.netlify.app/install.sh) --flannel --hostname master_test
tip: every machine must have different hostname to create cluster
master node run:
kubectl get nodes
, all node status is readykubectl get pods -n kube-system
, all pod status is 1/1
all check pass means create k8s cluster success!
k8s_install.sh [-h|--help] [options]
--flannel use flannel network, and set this node as master
--calico use calico network, and set this node as master
--hostname [HOSTNAME] set hostname
-v, --version [VERSION] install special version k8s
begin with k8s 1.24, k8s cri will use containerd to replace docker