搭建k8s高可用集群错误汇总—2023.03

简介: 搭建k8s高可用集群错误汇总—2023.03

cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: No such file or directory

问题:

在执行命令sysctl -p时报错

 sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: No such file or directory


0c0b1e3f866246b2925a3d68a440b1fd.png

解决:

[root@k8s-master1 net]# modprobe br_netfilter
[root@k8s-master1 net]# ls /proc/sys/net/bridge/
bridge-nf-call-arptables  bridge-nf-call-iptables        bridge-nf-filter-vlan-tagged
bridge-nf-call-ip6tables  bridge-nf-filter-pppoe-tagged  bridge-nf-pass-vlan-input-dev
[root@k8s-master1 net]# sysctl -p


-bash: netstart: command not found

问题:

在执行netstat -tunlp | grep haproxy时报错

-bash: netstart: command not found

61644e6816ec497ab209042ae0cd69e6.png

解决:

原因是因为没有netstat这个命令,需要安装。

yum install -y net-tools


再次执行就可以了

b2b4cd0e4590406bb1549875aacaa9a9.png

Could not resolve host: ftp.cc.uoc.gr; Unknown error

问题:

执行yum install ntpdate -y时报错:

921efcd1fbba4fba949934945c189e84.png

[root@k8s-worker1 ~]# yum install ntpdate -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.sjtu.edu.cn
 * elrepo: dfw.mirror.rackspace.com
 * extras: ftp.sjtu.edu.cn
 * updates: ftp.sjtu.edu.cn
http://mirrors.tuna.tsinghua.edu.cn/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.tuna.tsinghua.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.bupt.edu.cn/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.bupt.edu.cn; Unknown error"
Trying other mirror.
http://ftp.sjtu.edu.cn/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: ftp.sjtu.edu.cn; Unknown error"
Trying other mirror.
http://mirror.lzu.edu.cn/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirror.lzu.edu.cn; Unknown error"
Trying other mirror.
http://mirror01.idc.hinet.net/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirror01.idc.hinet.net; Unknown error"
Trying other mirror.
http://mirrors.bfsu.edu.cn/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.bfsu.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.cqu.edu.cn/CentOS/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cqu.edu.cn; Unknown error"
Trying other mirror.
^Chttp://mirrors.nju.edu.cn/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
Trying other mirror.
http://mirrors.qlu.edu.cn/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.qlu.edu.cn; Unknown error"
Trying other mirror.
http://mirrors.ustc.edu.cn/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.ustc.edu.cn; Unknown error"
Trying other mirror.
https://mirrors.tuna.tsinghua.edu.cn/elrepo/elrepo/el7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.tuna.tsinghua.edu.cn; Unknown error"
Trying other mirror.
http://dfw.mirror.rackspace.com/elrepo/elrepo/el7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: dfw.mirror.rackspace.com; Unknown error"
Trying other mirror.
http://elrepo.mirror.angkasa.id/elrepo/elrepo/el7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: elrepo.mirror.angkasa.id; Unknown error"
Trying other mirror.
http://elrepo.mirrors.arminco.com/elrepo/el7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: elrepo.mirrors.arminco.com; Unknown error"
Trying other mirror.
http://elrepo.org/linux/elrepo/el7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: elrepo.org; Unknown error"
Trying other mirror.
http://fedora.is/elrepo/elrepo/el7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: fedora.is; Unknown error"
Trying other mirror.
http://ftp.cc.uoc.gr/mirrors/elrepo/elrepo/el7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: ftp.cc.uoc.gr; Unknown error"
Trying other mirror.
http://ftp.icm.edu.pl/pub/Linux/distributions/elrepo/elrepo/el7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: ftp.icm.edu.pl; Unknown error"
Trying other mirror.

解决:

配置文件不全,修改如下

# vi /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8
nameserver fe80::1%ens33


相关实践学习
深入解析Docker容器化技术
Docker是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器上,也可以实现虚拟化,容器是完全使用沙箱机制,相互之间不会有任何接口。Docker是世界领先的软件容器平台。开发人员利用Docker可以消除协作编码时“在我的机器上可正常工作”的问题。运维人员利用Docker可以在隔离容器中并行运行和管理应用,获得更好的计算密度。企业利用Docker可以构建敏捷的软件交付管道,以更快的速度、更高的安全性和可靠的信誉为Linux和Windows Server应用发布新功能。 在本套课程中,我们将全面的讲解Docker技术栈,从环境安装到容器、镜像操作以及生产环境如何部署开发的微服务应用。本课程由黑马程序员提供。     相关的阿里云产品:容器服务 ACK 容器服务 Kubernetes 版(简称 ACK)提供高性能可伸缩的容器应用管理能力,支持企业级容器化应用的全生命周期管理。整合阿里云虚拟化、存储、网络和安全能力,打造云端最佳容器化应用运行环境。 了解产品详情: https://www.aliyun.com/product/kubernetes
相关文章
|
6月前
|
人工智能 算法 调度
阿里云ACK托管集群Pro版共享GPU调度操作指南
本文介绍在阿里云ACK托管集群Pro版中,如何通过共享GPU调度实现显存与算力的精细化分配,涵盖前提条件、使用限制、节点池配置及任务部署全流程,提升GPU资源利用率,适用于AI训练与推理场景。
585 1
|
6月前
|
弹性计算 监控 调度
ACK One 注册集群云端节点池升级:IDC 集群一键接入云端 GPU 算力,接入效率提升 80%
ACK One注册集群节点池实现“一键接入”,免去手动编写脚本与GPU驱动安装,支持自动扩缩容与多场景调度,大幅提升K8s集群管理效率。
401 89
|
11月前
|
资源调度 Kubernetes 调度
从单集群到多集群的快速无损转型:ACK One 多集群应用分发
ACK One 的多集群应用分发,可以最小成本地结合您已有的单集群 CD 系统,无需对原先应用资源 YAML 进行修改,即可快速构建成多集群的 CD 系统,并同时获得强大的多集群资源调度和分发的能力。
799 9
|
11月前
|
资源调度 Kubernetes 调度
从单集群到多集群的快速无损转型:ACK One 多集群应用分发
本文介绍如何利用阿里云的分布式云容器平台ACK One的多集群应用分发功能,结合云效CD能力,快速将单集群CD系统升级为多集群CD系统。通过增加分发策略(PropagationPolicy)和差异化策略(OverridePolicy),并修改单集群kubeconfig为舰队kubeconfig,可实现无损改造。该方案具备多地域多集群智能资源调度、重调度及故障迁移等能力,帮助用户提升业务效率与可靠性。
|
存储 Kubernetes 监控
K8s集群实战:使用kubeadm和kuboard部署Kubernetes集群
总之,使用kubeadm和kuboard部署K8s集群就像回归童年一样,简单又有趣。不要忘记,技术是为人服务的,用K8s集群操控云端资源,我们不过是想在复杂的世界找寻简单。尽管部署过程可能遇到困难,但朝着简化复杂的目标,我们就能找到意义和乐趣。希望你也能利用这些工具,找到你的乐趣,满足你的需求。
1133 33
|
Kubernetes 开发者 Docker
集群部署:使用Rancher部署Kubernetes集群。
以上就是使用 Rancher 部署 Kubernetes 集群的流程。使用 Rancher 和 Kubernetes,开发者可以受益于灵活性和可扩展性,允许他们在多种环境中运行多种应用,同时利用自动化工具使工作负载更加高效。
731 19
|
人工智能 分布式计算 调度
打破资源边界、告别资源浪费:ACK One 多集群Spark和AI作业调度
ACK One多集群Spark作业调度,可以帮助您在不影响集群中正在运行的在线业务的前提下,打破资源边界,根据各集群实际剩余资源来进行调度,最大化您多集群中闲置资源的利用率。
|
Prometheus Kubernetes 监控
OpenAI故障复盘丨如何保障大规模K8s集群稳定性
OpenAI故障复盘丨如何保障大规模K8s集群稳定性
529 0
OpenAI故障复盘丨如何保障大规模K8s集群稳定性
|
缓存 容灾 网络协议
ACK One多集群网关:实现高效容灾方案
ACK One多集群网关可以帮助您快速构建同城跨AZ多活容灾系统、混合云同城跨AZ多活容灾系统,以及异地容灾系统。
|
运维 分布式计算 Kubernetes
ACK One多集群Service帮助大批量应用跨集群无缝迁移
ACK One多集群Service可以帮助您,在无需关注服务间的依赖,和最小化迁移风险的前提下,完成跨集群无缝迁移大批量应用。

推荐镜像

更多