From 4b254a7cced77b9adf217953ff38f6f3cb6acf67 Mon Sep 17 00:00:00 2001 From: zhanglikun Date: Thu, 27 Apr 2023 11:39:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1-kernel_5.4.sh => -1-kernel_5.4.sh | 0 0-config.sh | 12 ++++++++++++ 0-download.sh | 16 ++++++++++++++++ 0-init.sh => 1-init.sh | 0 1-create_k8s.sh => 2-create_k8s.sh | 0 2-nginx_ingress.sh => 3-nginx_ingress.sh | 0 0-install_docker.sh => docker/install.sh | 2 +- ingress-nginx/install.sh | 2 +- kubeadm/install.sh | 1 - 9 files changed, 30 insertions(+), 3 deletions(-) rename 1-kernel_5.4.sh => -1-kernel_5.4.sh (100%) create mode 100644 0-config.sh create mode 100644 0-download.sh rename 0-init.sh => 1-init.sh (100%) rename 1-create_k8s.sh => 2-create_k8s.sh (100%) rename 2-nginx_ingress.sh => 3-nginx_ingress.sh (100%) rename 0-install_docker.sh => docker/install.sh (88%) diff --git a/1-kernel_5.4.sh b/-1-kernel_5.4.sh similarity index 100% rename from 1-kernel_5.4.sh rename to -1-kernel_5.4.sh diff --git a/0-config.sh b/0-config.sh new file mode 100644 index 0000000..138616d --- /dev/null +++ b/0-config.sh @@ -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 \ No newline at end of file diff --git a/0-download.sh b/0-download.sh new file mode 100644 index 0000000..ec8cb8c --- /dev/null +++ b/0-download.sh @@ -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/ diff --git a/0-init.sh b/1-init.sh similarity index 100% rename from 0-init.sh rename to 1-init.sh diff --git a/1-create_k8s.sh b/2-create_k8s.sh similarity index 100% rename from 1-create_k8s.sh rename to 2-create_k8s.sh diff --git a/2-nginx_ingress.sh b/3-nginx_ingress.sh similarity index 100% rename from 2-nginx_ingress.sh rename to 3-nginx_ingress.sh diff --git a/0-install_docker.sh b/docker/install.sh similarity index 88% rename from 0-install_docker.sh rename to docker/install.sh index 82cef90..ba1453b 100644 --- a/0-install_docker.sh +++ b/docker/install.sh @@ -1,5 +1,5 @@ #!/bin/bash -yum install -y ./*.rpm +yum install -y docker-ce-20.10/*.rpm sudo mkdir /etc/docker cat <