整理文件结构
This commit is contained in:
parent
6b1d891775
commit
bb0cf1697d
2
.env
2
.env
@ -1,3 +1,5 @@
|
||||
MODE="single"
|
||||
# MODE="cluster"
|
||||
MASTER1="10.0.0.112"
|
||||
MASTER2="10.0.0.122"
|
||||
MASTER3="10.0.0.132"
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 更新内核, 可选操作
|
||||
cd kernel_5.4 && bash install.sh && cd ..
|
@ -10,3 +10,9 @@
|
||||
| 1-init.sh | 初始化配置, 所有节点都需要执行 |
|
||||
| 2-create_k8s.sh | 创建集群, 只需要在一台master上执行即可 |
|
||||
| 3-nginx_ingress.sh | 安装nginx-ingress |
|
||||
|
||||
事先执行0-download.sh下载好离线包到master1上面
|
||||
5.4内核看个人需求是否执行
|
||||
|
||||
## 单节点k8s部署
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
yum install -y docker-ce-20.10/*.rpm
|
||||
|
||||
sudo mkdir /etc/docker
|
||||
|
@ -1,3 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
ls *.tar | xargs -I {} docker load -i {}
|
||||
kubectl apply -f ./kube-flannel.yml
|
||||
|
@ -1,4 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
ls *.tar | xargs -I {} docker load -i {}
|
||||
kubectl taint node $(hostname) node-role.kubernetes.io/master-
|
||||
kubectl apply -f ./nginx-ingress-daemonset.yaml
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
yum install -y ./*.rpm
|
||||
systemctl enable --now keepalived
|
@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
yum install -y ./*.rpm
|
||||
ls *.tar | xargs -I {} docker load -i {}
|
||||
systemctl enable --now kubelet
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
cd temp/
|
||||
cd ../temp/
|
||||
curl -OL -C - https://github.com/iuxt/offline-kubernetes-install/releases/download/docker-ce-20.10.23-3.el7.x86_64/docker-ce-20.10.tar.gz
|
||||
curl -OL -C - https://github.com/iuxt/offline-kubernetes-install/releases/download/flannel/flannel.tar.gz
|
||||
curl -OL -C - https://github.com/iuxt/offline-kubernetes-install/releases/download/ingress-nginx/ingress-nginx.tar.gz
|
5
scripts/0-kernel_5.4.sh
Executable file
5
scripts/0-kernel_5.4.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# 更新内核, 可选操作
|
||||
cd ../kernel_5.4 && bash install.sh && cd ..
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ $(id -u) != "0" ]; then
|
||||
echo "Error: You must be root to run this script"
|
@ -1,4 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
source .env
|
||||
|
||||
|
||||
apiserver="__API_SERVER__"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
cd ingress-nginx && bash install.sh && cd ..
|
Loading…
Reference in New Issue
Block a user