Use shell scripts to deploy kubernetes high availability clusters and addon components based on kubeadmin with one click


kainstall = kubeadm install kubernetes

Deploy kubernetes clusters with shell scripts, based on kubeadm, with one click.


What’s wrong with Ansible PlayBook?

Ansible PlayBook scheduling is very powerful, but requires Python and Ansible to be installed, and multiple yaml files to be downloaded. I want an easier way to quickly deploy a distributed Kubernetes HA cluster, using shell scripts that run directly on the server without external help, saving time and effort. The shell script is a single file, less than 100 KB*, which is very small and allows you to install the cluster with a single command, and with the offline installer, you can install the cluster in a non-networked environment, which is a very cool experience.


  • Server initialization.
    • Shut down selinux.
    • Close swap
    • Close firewalld
    • Close large memory pages
    • Configuring the epel source
    • Modify limits
    • Configuring Kernel Parameters
    • Configure history records.
    • Configuring the journal log
    • Configuring chrony time synchronization
    • Installing ipvs modules
    • Updating the kernel
  • Install docker, kube components.
  • Initialize kubernetes cluster, and add or remove nodes.
  • Install the ingress component, optionally nginx, traefik.
  • Install the network component, with options for flannel and calico, which should be specified during initialization.
  • Install the monitor component, optionally prometheus.
  • Install the log component, optionally elasticsearch.
  • Install the storage component, optionally rook and longhorn.
  • Install the web ui component, optionally dashboard, kubesphere.
  • Upgrade to the specified version of kubernetes.
  • Update cluster certificates.
  • Add maintenance operations, such as backup of etcd snapshots.
  • Support for offline deployments.
  • Support for sudo privileges.
  • Support for 10 year certificate duration.
  • Support for environment variable assignment.
  • Support for kubernetes for v1.15.x+.

One-click initialization.

bash -c "$(curl -sSL" \
  - init \
  --master,, \
  --worker, \
  --user root \
  --password 123456 \
  --port 22 \
  --version 1.19.3

For more operations see: kainstall Warehouse