Docker 请使用18.09, k8s 暂不支持 Docker 最新版19.x, 安装时请按照文档描述的方式明确指定版本号yum install docker-ce-18.09.9-3.el7 docker-ce-cli-18.09.9-3.el7 containerd.io.
添加阿里云 YUM 软件源 设置仓库地址 # cat > /etc/docker/daemon.json << EOF { “registry-mirrors”: } EOF 添加 yum 源 $ cat > /etc/yum.repos.d/kubernetes.repo << EOF name=Kubernetes baseurl=见原文链接 enabled=1 gpgcheck=0 repo_gpgcheck=0 gpgkey=见原文链接 见原文链接 EOF。
在 Master 和 Workers 中禁用 SElinux,因此如果禁用 SElinux,所有容器都可以轻松访问主机文件系统,使用 vi 编辑器在配置文件中制作“ SELINUX=disabled” /etc/selinux/config。
The connection to the server 192.168.199.188:6443 was refused - did you specify the right host or port?
原因是:安装K8S需要配置ipvs功能,但是在进行配置时会报错modprobe: FATAL: Module nf_conntrack_ipv4 not found.这是因为使用了高内核,较如博主就是使用了5.2的内核,一般教程都是3.2的内核。
Say good-bye to HAProxy and Keepalived with kube-vip on your HA K8s control plane | by Kohei Ota | Medium。
node 节点上的 kubelet 组件接收到指令后,会通知docker,然后由 docker 来启动一个 nginx 的podpod 是 kubernetes 中的最小操作单元,容器都是跑在 pod 中。