微服务》》Kubernetes (K8S) 集群配置网络》》Calico

嘻嘻嘻


以Calico 为例子

Calico官网

官网上有安装Calico插件的步骤
步骤

要在主节点 主节点 主节点 执行

kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.29.2/manifests/tigera-operator.yaml

kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.29.2/manifests/custom-resources.yaml

watch kubectl get pods -n kube-system

kubectl get pod --all-namespaces

查看所有pod 发现 coredns-* 一直pengding

kubectl get pod --all-namespaces

查看对应的pod的详细描述

kubectl describe pod coredns-7ff77c879f-twksf -n kube-system|less

查看节点

kubectl describe nodes k8s-node1|less

》》》删除污点

kubectl get no -o yaml | grep taint -A 5

kubectl taint nodes --all node.kubernetes.io/not-ready-

》》》ContainerCreating

kubectl get pods -n kube-system -owide

》》使用describe查看错误信息。

kubectl describe pods -n kube-system coredns-66f779496c-559gr

》》删除pod

csharp 复制代码
kubectl delete pod tigera-operator-c78c656bf-fww8k  -n tigera-operator  --grace-period=0 --force


删除

csharp 复制代码
kubectl delete -f tigera-operator.yaml
kubectl delete -f custom-resources.yaml 

kubectl delete -f xxx.yaml

命名空间 被终止 Terminating

解决方案:

kubectl delete namaspace tigera-operator

如果还删除不掉

导出命名空间配置

kubectl get namespace tigera-operator -o json > tigera-operator.json

编辑命名空间配置

vim tigera-operator.json

编辑的内容如下 《编辑配置文件》

kubectl replace --raw "/api/v1/namespaces/tigera-operator/finalize" -f tigera-operator.json

kubectl get namespace tigera-operator 应该就删除了

》》编辑配置文件

csharp 复制代码
###  之前
{
  "spec": {
    "finalizers": []
  }
}
## 改成之后
{
  "spec": {
    
  }
}
相关推荐
Sapphire~5 小时前
Linux-07 ubuntu 的 chrome 启动不了
linux·chrome·ubuntu
伤不起bb5 小时前
NoSQL 之 Redis 配置与优化
linux·运维·数据库·redis·nosql
广东数字化转型5 小时前
nginx怎么使用nginx-rtmp-module模块实现直播间功能
linux·运维·nginx
啵啵学习5 小时前
Linux 里 su 和 sudo 命令这两个有什么不一样?
linux·运维·服务器·单片机·ubuntu·centos·嵌入式
半桔6 小时前
【Linux手册】冯诺依曼体系结构
linux·缓存·职场和发展·系统架构
网硕互联的小客服6 小时前
如何利用Elastic Stack(ELK)进行安全日志分析
linux·服务器·网络·安全
冰橙子id7 小时前
linux——磁盘和文件系统管理
linux·运维·服务器
无聊的小坏坏8 小时前
环境变量深度解析:从配置到内核的全链路指南
linux·bash
才鲸嵌入式8 小时前
01 Ubuntu20.04下编译QEMU8.2.4,交叉编译32位ARM程序,运行ARM程序的方法
linux·c语言·单片机·嵌入式·arm·qemu·虚拟机
伤不起bb9 小时前
Kafka 消息队列
linux·运维·分布式·kafka