Coder Social home page Coder Social logo

blacksun1977 / kube-install Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudnativer/kube-install

0.0 0.0 0.0 28.73 MB

One click fast installation of highly available kubernetes cluster, as well as addition of kubernetes node, deletion of kubernetes node, destruction of kubernetes master, rebuild of kubernetes master, and uninstallation of cluster in later operation and maintenance stage.

License: Apache License 2.0

Shell 3.46% Go 44.35% Jinja 51.99% Makefile 0.20%

kube-install's Introduction

One click fast installation of highly available kubernetes cluster, as well as addition of kubernetes node, deletion of kubernetes node, destruction of kubernetes master, rebuild of kubernetes master, and uninstallation of cluster in later operation and maintenance stage.

kube-install

[1] Compatibility


Kube-install and kubernetes version correspondence:
kube-install VersionInstallation package to downloadSupported installed versionsSupported OS
kube-install v0.1.* kube-install-for-k8s1.14-v0.1.*.tgz Install kubernetes v1.14.* CentOS 7
kube-install v0.2.* kube-install-for-k8s1.14-v0.2.*.tgz Install kubernetes v1.14.* CentOS 7
kube-install v0.3.* kube-install-for-k8s1.14-v0.3.*.tgz Install kubernetes v1.14.* CentOS 7
kube-install v0.3.* kube-install-for-k8s1.15-v0.3.*.tgz Install kubernetes v1.15.* CentOS 7
kube-install v0.3.* kube-install-for-k8s1.16-v0.3.*.tgz Install kubernetes v1.16.* CentOS 7
kube-install v0.3.* kube-install-for-k8s1.17-v0.3.*.tgz Install kubernetes v1.17.* CentOS 7
kube-install v0.3.* kube-install-for-k8s1.18-v0.3.*.tgz Install kubernetes v1.18.* CentOS 7
kube-install v0.4.* kube-install-for-k8s1.14-v0.4.*.tgz Install kubernetes v1.14.* CentOS 7/RHEL 7
kube-install v0.4.* kube-install-for-k8s1.15-v0.4.*.tgz Install kubernetes v1.15.* CentOS 7/RHEL 7
kube-install v0.4.* kube-install-for-k8s1.16-v0.4.*.tgz Install kubernetes v1.16.* CentOS 7/RHEL 7
kube-install v0.4.* kube-install-for-k8s1.17-v0.4.*.tgz Install kubernetes v1.17.* CentOS 7/RHEL 7
kube-install v0.4.* kube-install-for-k8s1.18-v0.4.*.tgz Install kubernetes v1.18.* CentOS 7/RHEL 7
kube-install v0.4.* kube-install-for-k8s1.19-v0.4.*.tgz Install kubernetes v1.19.* CentOS 7/RHEL 7
kube-install v0.4.* kube-install-for-k8s1.20-v0.4.*.tgz Install kubernetes v1.20.* CentOS 7/RHEL 7
kube-install v0.4.* kube-install-for-k8s1.21-v0.4.*.tgz Install kubernetes v1.21.* CentOS 7/RHEL 7
kube-install v0.5.* kube-install-for-k8s1.14-v0.5.*.tgz Install kubernetes v1.14.* CentOS 7/RHEL 7
kube-install v0.5.* kube-install-for-k8s1.15-v0.5.*.tgz Install kubernetes v1.15.* CentOS 7/RHEL 7
kube-install v0.5.* kube-install-for-k8s1.16-v0.5.*.tgz Install kubernetes v1.16.* CentOS 7/RHEL 7
kube-install v0.5.* kube-install-for-k8s1.17-v0.5.*.tgz Install kubernetes v1.17.* CentOS 7/RHEL 7
kube-install v0.5.* kube-install-for-k8s1.18-v0.5.*.tgz Install kubernetes v1.18.* CentOS 7/RHEL 7
kube-install v0.5.* kube-install-for-k8s1.19-v0.5.*.tgz Install kubernetes v1.19.* CentOS 7/RHEL 7
kube-install v0.5.* kube-install-for-k8s1.20-v0.5.*.tgz Install kubernetes v1.20.* CentOS 7/RHEL 7
kube-install v0.5.* kube-install-for-k8s1.21-v0.5.*.tgz Install kubernetes v1.21.* CentOS 7/RHEL 7
kube-install v0.6.* kube-install-for-k8s1.14-v0.6.*.tgz Install kubernetes v1.14.* CentOS 7/RHEL 7/CentOS 8/RHEL 8/SUSE15
kube-install v0.6.* kube-install-for-k8s1.15-v0.6.*.tgz Install kubernetes v1.15.* CentOS 7/RHEL 7/CentOS 8/RHEL 8/SUSE15
kube-install v0.6.* kube-install-for-k8s1.16-v0.6.*.tgz Install kubernetes v1.16.* CentOS 7/RHEL 7/CentOS 8/RHEL 8/SUSE15
kube-install v0.6.* kube-install-for-k8s1.17-v0.6.*.tgz Install kubernetes v1.17.* CentOS 7/RHEL 7/CentOS 8/RHEL 8/SUSE15
kube-install v0.6.* kube-install-for-k8s1.18-v0.6.*.tgz Install kubernetes v1.18.* CentOS 7/RHEL 7/CentOS 8/RHEL 8/SUSE15
kube-install v0.6.* kube-install-for-k8s1.19-v0.6.*.tgz Install kubernetes v1.19.* CentOS 7/RHEL 7/CentOS 8/RHEL 8/SUSE15
kube-install v0.6.* kube-install-for-k8s1.20-v0.6.*.tgz Install kubernetes v1.20.* CentOS 7/RHEL 7/CentOS 8/RHEL 8/SUSE15
kube-install v0.6.* kube-install-for-k8s1.21-v0.6.*.tgz Install kubernetes v1.21.* CentOS 7/RHEL 7/CentOS 8/RHEL 8/SUSE15
kube-install v0.6.* kube-install-for-k8s1.22-v0.6.*.tgz Install kubernetes v1.22.* CentOS 7/RHEL 7/CentOS 8/RHEL 8/SUSE15

Notice: kube-install supports CentOS 7, CentOS 8, SUSE 15, RHEL 7 and RHEL 8 operating system environments. For a list of supported operating system distributions, please refer to OS support list.


[2] How to install?


If you have four servers,kubernetes master software is installed on the three servers (192.168.1.11, 192.168.1.12, 192.168.1.13), and kubernetes node software is installed on the four servers (192.168.1.11, 192.168.1.12, 192.168.1.13, 192.168.1.14). The operating system of the server is pure CentOS Linux or RHEL(Red Hat Enterprise Linux). It's like this:

IP AddressRoleOS VersionRoot Password
192.168.1.11k8s-master,k8s-nodeCentOS Linux release 7 or Red Hat Enterprise Linux(RHEL) 7cloudnativer
192.168.1.12k8s-master,k8s-nodeCentOS Linux release 7 or Red Hat Enterprise Linux(RHEL) 7cloudnativer
192.168.1.13k8s-master,k8s-nodeCentOS Linux release 7 or Red Hat Enterprise Linux(RHEL) 7cloudnativer
192.168.1.14k8s-nodeCentOS Linux release 7 or Red Hat Enterprise Linux(RHEL) 7cloudnativer
You expect the architecture after installation to be as follows:

kube-install-arch


2.1 Download kube-install package file


You can download the kube-install-*.tgz package from https://github.com/cloudnativer/kube-install/releases.

download-pkg

If you want to install version 1.18 of kubernetes, download the kube-install-for-k8s1.18-*.tgz package file.If you want to install version 1.15 of kubernetes, download the kube-install-for-k8s1.15-*.tgz package file...In the same way, you can download the version you want.

For example, we are now installing kubernetes v1.21, and we have downloaded the kube-install-for-k8s1.21-v0.6.1.tgz package.

# cd /root/
# wget https://github.com/cloudnativer/kube-install/releases/download/v0.6.1/kube-install-for-k8s1.21-v0.6.1.tgz
# tar -zxvf kube-install-for-k8s1.21-v0.6.1.tgz
# cd /root/kube-install/

2.2 Initialize system environment


Please operate in the root user environment. Perform the system environment initialization operation on the k8s-master selected above:
# cd /root/kube-install/
# ./kube-install -opt init -ostype "centos7"

Notice: Please make sure that the -ostype flag you entered is correct, only support rhel7, rhel8, centos7, centos8, suse15 these types of "ostype".


2.3 Install kubernetes cluster


Please operate in the root user environment. Execute on the k8s-master selected above:
# cd /root/kube-install/
# ./kube-install -opt install -master "192.168.1.11,192.168.1.12,192.168.1.13" -node "192.168.1.11,192.168.1.12,192.168.1.13,192.168.1.14" -sshpwd "cloudnativer" -ostype "centos7"

Notice: Please make sure that the -ostype flag you entered is correct, only support rhel7, rhel8, centos7, centos8, suse15 these types of "ostype".


2.4 Login kubernetes dashboard UI


Execute the following command on the k8s-master you selected to view the kube-dashboard console URL and key:
# cat /opt/kube-install/loginkey.txt

loginkey

Login to the kube-dashboard console UI using the URL and key in the /opt/kube-install/loginkey.txt document.Here are the relevant screenshots:

kube-dashboard

kube-dashboard




[3] Operation and maintenance


After kube-install is installed, you can directly execute kube-install command in any directory of any k8s-master server.Kube-install can not only quickly install the highly available kubernetes cluster, but also add k8s-node, delete k8s-node, delete k8s-master and rebuild k8s-master.

Suppose you expect to install two servers (192.168.1.15 and 192.168.1.16) as k8s-nodes and join the kubernetets cluster in Chapter [2].

IP AddressRoleOS VersionRoot Password
192.168.1.11k8s-master,k8s-nodeCentOS Linux release 7 or Red Hat Enterprise Linux(RHEL) 7cloudnativer
192.168.1.12k8s-master,k8s-nodeCentOS Linux release 7 or Red Hat Enterprise Linux(RHEL) 7cloudnativer
192.168.1.13k8s-master,k8s-nodeCentOS Linux release 7 or Red Hat Enterprise Linux(RHEL) 7cloudnativer
192.168.1.14k8s-nodeCentOS Linux release 7 or Red Hat Enterprise Linux(RHEL) 7cloudnativer
192.168.1.15k8s-nodeCentOS Linux release 7 or Red Hat Enterprise Linux(RHEL) 7cloudnativer
192.168.1.16k8s-nodeCentOS Linux release 7 or Red Hat Enterprise Linux(RHEL) 7cloudnativer

Select any k8s-master server, and execute the following command on it:

# kube-install -opt addnode -node "192.168.1.15,192.168.1.16" -sshpwd "cloudnativer" -ostype "centos7"

Notice: Please make sure that the -ostype flag you entered is correct, only support rhel7, rhel8, centos7, centos8, suse15 these types of "ostype".


The architecture after installation is shown in the following figure:

kube-install-arch


You can click here to view more operation documents about add k8s-node, delete k8s-node, delete k8s-master, rebuild k8s-master, and uninstall cluster.



[4] Parameter introduction


The parameters about kube-install can be viewed using the kube-install help command. You can also see more detailed parameter introduction here.



[5] How to build it?


The build can be completed automatically by executing the make command. You can also see more detailed build instructions here.




kube-install's People

Contributors

cloudnativer avatar houseonline avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.