Introduction
kainstall = kubeadm install kubernetes
Deploy kubernetes clusters with shell scripts, based on kubeadm, with one click.
Why?
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.
Features
- 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
- Shut down
- Install
docker
,kube
components. - Initialize
kubernetes
cluster, and add or remove nodes. - Install the
ingress
component, optionallynginx
,traefik
. - Install the
network
component, with options forflannel
andcalico
, which should be specified during initialization. - Install the
monitor
component, optionallyprometheus
. - Install the
log
component, optionallyelasticsearch
. - Install the
storage
component, optionallyrook
andlonghorn
. - Install the
web ui
component, optionallydashboard
,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 https://cdn.jsdelivr.net/gh/lework/kainstall/kainstall.sh)" \
- init \
--master 192.168.77.130,192.168.77.131,192.168.77.132 \
--worker 192.168.77.133,192.168.77.134 \
--user root \
--password 123456 \
--port 22 \
--version 1.19.3
For more operations see: kainstall Warehouse