Kubernetes1.14 学习笔记二: 安装K8S

比眉伴天荒 2022-04-24 00:48 254阅读 0赞

一、安装rpm 包

rpm 制作过程参考上一节(https://blog.csdn.net/yulei_qq/article/details/89205022)

运行如下命令:

  1. [root@k8s x86_64]# yum localinstall *.rpm
  2. .............
  3. Installed:
  4. 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
  5. Dependency Installed:
  6. 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
  7. libnetfilter_queue.x86_64 0:1.0.2-2.el7_2 socat.x86_64 0:1.7.3.2-2.el7
  8. Complete!
  9. 设置开机启动
  10. systemctl enable --now kubelet

注意:

  • Setting SELinux in permissive mode by running setenforce 0 and sed ... 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 your sysctl config, e.g.

    1. cat <<EOF > /etc/sysctl.d/k8s.conf
    2. net.bridge.bridge-nf-call-ip6tables = 1
    3. net.bridge.bridge-nf-call-iptables = 1
    4. EOF
    5. sysctl --system
  • Make sure that the br_netfilter module is loaded before this step. This can be done by running lsmod | grep br_netfilter. To load it explicitly call modprobe br_netfilter.

    kubelet现在每隔几秒钟就重新启动一次,因为它在崩溃循环中等待kubeadm告诉它该做什么。

发表评论

表情:
评论列表 (有 0 条评论,254人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Kubernetes k8s 笔记

    核心功能 1. 容器编排和管理:Kubernetes可以自动化容器的部署、管理和扩展,使得应用程序可以在多个容器之间进行平滑的切换。 2. 自动化负载均衡:Kuber