Centos7 安装k8s
2022/4/5 7:21:40
本文主要是介绍Centos7 安装k8s,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
按照步骤失败后就用kubeadm reset命令重置,后来就好了
安装Kubernetes(k8s)保姆级教程---无坑版
重置Kubernetes
https://www.jianshu.com/p/31f7dda9ccf7
重置命令
sudo kubeadm reset
结果:
W0419 09:34:58.549504 4085 removeetcdmember.go:61] [reset] failed to remove etcd member: etcdserver: re-configuration failed due to not enough started members .Please manually remove this etcd member using etcdctl [reset] Stopping the kubelet service [reset] Unmounting mounted directories in "/var/lib/kubelet" [reset] Deleting contents of config directories: [/etc/kubernetes/manifests /etc/kubernetes/pki] [reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf] [reset] Deleting contents of stateful directories: [/var/lib/etcd /var/lib/kubelet /var/lib/dockershim /var/run/kubernetes /var/lib/cni] The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d The reset process does not reset or clean up iptables rules or IPVS tables. If you wish to reset iptables, you must do so manually by using the "iptables" command. If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar) to reset your system's IPVS tables. The reset process does not clean your kubeconfig files and you must remove them manually. Please, check the contents of the $HOME/.kube/config file.
手工清除:
删除net.d
rm -rf /etc/cni/net.d
重置iptables
iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X sysctl net.bridge.bridge-nf-call-iptables=1
手动执行以下命令来清除对应的残余网卡信息:
sudo ip link del cni0 sudo ip link del flannel.1
删除 $HOME/.kube/config
rm -rf $HOME/.kube/config
这篇关于Centos7 安装k8s的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-12-23云原生周刊:利用 eBPF 增强 K8s
- 2024-12-20/kubernetes 1.32版本更新解读:新特性和变化一目了然
- 2024-12-19拒绝 Helm? 如何在 K8s 上部署 KRaft 模式 Kafka 集群?
- 2024-12-16云原生周刊:Kubernetes v1.32 正式发布
- 2024-12-13Kubernetes上运行Minecraft:打造开发者平台的例子
- 2024-12-12深入 Kubernetes 的健康奥秘:探针(Probe)究竟有多强?
- 2024-12-10运维实战:K8s 上的 Doris 高可用集群最佳实践
- 2024-12-022024年最好用的十大Kubernetes工具
- 2024-12-02OPA守门人:Kubernetes集群策略编写指南
- 2024-11-26云原生周刊:K8s 严重漏洞