微服务》》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": {
    
  }
}
相关推荐
生活很暖很治愈19 分钟前
Linux——孤儿进程&进程调度&大O(1)调度
linux·服务器·ubuntu
HalvmånEver35 分钟前
Linux:线程同步
linux·运维·服务器·线程·同步
Zach_yuan38 分钟前
自定义协议:实现网络计算器
linux·服务器·开发语言·网络
wdfk_prog1 小时前
[Linux]学习笔记系列 -- [drivers][I2C]I2C
linux·笔记·学习
VekiSon1 小时前
Linux内核驱动——杂项设备驱动与内核模块编译
linux·c语言·arm开发·嵌入式硬件
Y1rong1 小时前
linux之网络
linux
寄存器漫游者2 小时前
Linux 软件编程 - IO 编程
linux·运维·spring
_别来无恙_2 小时前
TFTP的使用Linux
linux·服务器
Zaralike2 小时前
Linux 服务器网络不通排查 SOP(标准操作流程)
linux·服务器·网络
getapi2 小时前
注塑件的费用构成
linux·服务器·ubuntu