use a simple shell to build Kubernetes and dashboard in Centos7.
default install kubernetes1.19.4 + docker-ce-19.03.9 + calico
-
Prepare an environment with (Centos7, and make sure the network is available)
-
Download the git files or git clone the repository
git clone https://github.com/kid1999/k8s-install-shell.git
-
Enter directory and give shell files permissions.
cd k8s-install-shell chmod 755 dashboard-install.sh k8s-install.sh
-
install Docker and Kubernetes.
./k8s-install.sh
some options:
- set hostname default k8s-master
- this node is master-node? [y/n] default no
- set kube-api IP default 192.168.56.100
- choice the docker version to install
- choice the k8s version to install
-
init Kubernetes or join master node?
- master node: init k8s,install information and join shell save in ./kubeadm.log .
- work node: join master node with shell in ./kubeadm.log .
default install kubernetesui/dashboard:v2.5.1
-
Installed the K8S.
-
install dashboard.
./dashboard-install.sh
-
vist https://node-IP:30009 with token save in ./dashboard.log