1 Star 4 Fork 3

Jiezhang Wang/kubeedge-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setup-cloud.sh 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
Jiezhang Wang 提交于 2022-03-06 22:04 . add comment for ntpdate
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
source ./tools.sh
function prepare_k8s_master_node() {
# 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
# 禁用selinux
setenforce 0
# 网络配置,开启相应的转发机制
cat >> /etc/sysctl.d/k8s.conf <<EOF
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
vm.swappiness=0
EOF
# 生效规则
modprobe br_netfilter
sysctl -p /etc/sysctl.d/k8s.conf
# 查看是否生效
cat /proc/sys/net/bridge/bridge-nf-call-ip6tables
cat /proc/sys/net/bridge/bridge-nf-call-iptables
# 关闭系统swap
swapoff -a
# 安装k8s工具
yum install -y kubernetes-master kubernetes-kubeadm kubernetes-client kubernetes-kubelet
# 开机启动kubelet
systemctl enable kubelet --now
}
arch_to_toolarch $arch
install_crictl
install_cni
prepare_k8s_master_node
update_isulad_config cloud
restart_isulad
yum install -y kubeedge-keadm kubeedge-cloudcore
echo "waiting for ntpdate, you can shutdown it by Ctrl+C"
echo "ntpdate cn.pool.ntp.org"
ntpdate cn.pool.ntp.org
echo "Done!"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Poorunga/kubeedge-tools.git
git@gitee.com:Poorunga/kubeedge-tools.git
Poorunga
kubeedge-tools
kubeedge-tools
master

搜索帮助