Kubernetes1.14 学习笔记二: 安装K8S
一、安装rpm 包
rpm 制作过程参考上一节(https://blog.csdn.net/yulei_qq/article/details/89205022)
运行如下命令:
[root@k8s x86_64]# yum localinstall *.rpm
.............
Installed:
kubeadm.x86_64 0:1.14.1-0 kubectl.x86_64 0:1.14.1-0 kubelet.x86_64 0:1.14.1-0 kubernetes-cni.x86_64 0:0.7.5-0
Dependency Installed:
conntrack-tools.x86_64 0:1.4.4-4.el7 libnetfilter_cthelper.x86_64 0:1.0.0-9.el7 libnetfilter_cttimeout.x86_64 0:1.0.0-6.el7
libnetfilter_queue.x86_64 0:1.0.2-2.el7_2 socat.x86_64 0:1.7.3.2-2.el7
Complete!
设置开机启动
systemctl enable --now kubelet
注意:
- Setting SELinux in permissive mode by running
setenforce 0
andsed ...
effectively disables it. This is required to allow containers to access the host filesystem, which is needed by pod networks for example. You have to do this until SELinux support is improved in the kubelet. Some users on RHEL/CentOS 7 have reported issues with traffic being routed incorrectly due to iptables being bypassed. You should ensure
net.bridge.bridge-nf-call-iptables
is set to 1 in yoursysctl
config, e.g.cat <<EOF > /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl --system
Make sure that the
br_netfilter
module is loaded before this step. This can be done by runninglsmod | grep br_netfilter
. To load it explicitly callmodprobe br_netfilter
.kubelet现在每隔几秒钟就重新启动一次,因为它在崩溃循环中等待kubeadm告诉它该做什么。
还没有评论,来说两句吧...