微服务》》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": {
    
  }
}
相关推荐
进取星辰23 分钟前
24、TypeScript:预言家之书——React 19 类型系统
linux·运维·ubuntu
月上柳青24 分钟前
linux-驱动开发之设备树详解(RK平台为例)
linux·驱动开发·dsp开发
阳区欠1 小时前
【Linux】线程的同步与互斥
linux·服务器·c++·线程同步·线程互斥·生产者/消费者模型
WG_171 小时前
Linux:43线程封装与互斥lesson31
linux·运维·服务器
showmethetime1 小时前
centos 中查看 内存及磁盘使用率
linux·运维·centos
Eloudy1 小时前
MacOS 上构建 gem5
linux·运维·macos
suger-J1 小时前
01-centos离线升级至almalinux
linux·centos
小武~1 小时前
ARMV8 RK3399 u-boot TPL启动流程分析 --crt0.S
linux·u-boot·rockchip·arm-v8·tpl
慢一点会很快1 小时前
【Tools】VScode远程调试linux服务器(打断点可视化界面方式)
linux·服务器·vscode
码码哈哈爱分享1 小时前
【2025最新】Vm虚拟机中直接使用Ubuntu 免安装过程直接使用教程与下载
linux·运维·ubuntu