To setup a k8s cluster with terminal UI. Thanks to these two amazing projects:
- Create a new k8s cluster, or add nodes to existing cluster
- Auto assign nodes to control plane or etcd role
- Edit node labels
- Auto open necessary firewall rules on each node (firewalld or ufw)
- Feature switchers: ntp, containerd insecure registries, install additional packages on nodes
- Select cluster HA mode: localhost load balancing, or kube-vip
- Config service & pod CIDR, and perform potential IP conflicts checking (sampled)
- Enable public download mirror to accelerate download speed in China
- Auto create SSH key and copy to each node
Download the release package, unpack it on a linux host and execute "k8s-installer-tui" with root privilege.
Each node provided will be assigned as different role according to Cluster size and roles.
Labels can be selected from predefined ones, or input directly. One line by one label.
For containerd insecure registries, new entry must follow the format of the example. One line by one entry.
5 IPs from each CIDR will be selected, and 'ping' command will be used to check IP conflict from the host installer running on.
Thanks to DaoCloud.
Final check inventory file and extra vars, or edit them directly. Root password of all nodes is needed if everything is OK.
Execution log is stored in the file which path is shown on top of the window. The content of log file is also scrolling displayed on the windows.
The background color will be set to green if setup is successful, or red if something is wrong.
Role of new added host will be assigned according to Cluster size and roles.
Cluster Size | node1 | node2 | node3 | node4 and others |
---|---|---|---|---|
1 | control-plane etcd |
|||
2 | control-plane etcd |
control-plane | ||
3 | control-plane etcd |
control-plane etcd |
work node etcd |
|
4 and above |
control-plane etcd |
control-plane etcd |
work node etcd |
work node |