关闭swap分区
sudo swapoff -a
确保时区,时间正确
sudo timedatectl
确保虚机不会自动suspend
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
加载内核模块br_netfilter,并调整参数
sudo modprobe br_netfilter
验证
lsmod | grep br_netfilter
调整内核参数,修改 /etc/sysctl.conf
cat > /etc/sysctl.conf << EFO net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EFO
设置rp_filter的值
cat > /etc/sysctl.d/10-network-security.conf << EFO net.ipv4.conf.default.rp_filter=1 net.ipv4.conf.all.rp_filter=1 EFO
生效
sudo sysctl --system
如果您预先设置了自己的引导密码,请在这里输入。否则会为您生成一个随机的。
用docker ps找到你的容器ID,然后运行:
sudo docker logs 28fedd17fc15 2>&1 | grep "Bootstrap Password:" 2022/10/21 06:49:08 [INFO] Bootstrap Password: zrv99r7xrs22wvfksfwlxqt5n52j4mh8pgntc4nvm6xc8269jwxk4w
修改密码:
导入K8S集群:
标签:sysctl,target,部署,sudo,br,etc,conf,Rancher From: https://www.cnblogs.com/libruce/p/17021667.html