修改配置文件

This commit is contained in:
zhanglikun 2023-04-27 11:39:30 +08:00
parent f867b23ac5
commit 4b254a7cce
No known key found for this signature in database
GPG Key ID: CEA7CACC468ACDFE
9 changed files with 30 additions and 3 deletions

12
0-config.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
master1="10.0.0.112"
master2="10.0.0.122"
master3="10.0.0.132"
vip="10.0.0.32"
sed -e "s/10.0.0.11/${master1}/g" \
-e "s/10.0.0.12/${master2}/g" \
-e "s/10.0.0.13/${master3}/g" \
-e "s/10.0.0.3/${vip}/g" \
-i keepalived/*.conf

16
0-download.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
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
# curl -OL -C - https://github.com/iuxt/offline-kubernetes-install/releases/download/kernel_5.4/kernel_5.4.tar.gz
curl -OL -C - https://github.com/iuxt/offline-kubernetes-install/releases/download/kubeadm_images/kubeadm_images.tar.gz
curl -OL -C - https://github.com/iuxt/offline-kubernetes-install/releases/download/kubeadm_rpms/kubeadm_rpms.tar.gz
tar xf docker-ce-20.10.tar.gz -C ../docker/
tar xf flannel.tar.gz -C ../flannel/
tar xf ingress-nginx.tar.gz -C ../ingress-nginx/
# tar xf kernel_5.4.tar.gz -C ../kernel_5.4/
tar xf kubeadm_images.tar.gz -C ../kubeadm/
tar xf kubeadm_rpms.tar.gz -C ../kubeadm/

View File

@ -1,5 +1,5 @@
#!/bin/bash
yum install -y ./*.rpm
yum install -y docker-ce-20.10/*.rpm
sudo mkdir /etc/docker
cat <<EOF | sudo tee /etc/docker/daemon.json

View File

@ -1,4 +1,4 @@
#!/bin/bash
ls *.tar | xargs -I {} docker load -i {}
kubectl taint node centos7 node-role.kubernetes.io/master-
kubectl taint node $(hostname) node-role.kubernetes.io/master-
kubectl apply -f ./nginx-ingress-daemonset.yaml

View File

@ -1,6 +1,5 @@
#!/bin/bash
yum install -y ./*.rpm
cd tar
ls *.tar | xargs -I {} docker load -i {}
systemctl enable --now kubelet