微服务》》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": {
    
  }
}
相关推荐
weixin_462446231 分钟前
Python 实战:将 HTML 表格一键导出为 Excel(xlsx)
linux·python·excel·pandas
济6174 分钟前
linux 系统移植(第九期)----Linux 内核顶层 Makefile- make xxx_defconfig 过程-- Ubuntu20.04
linux·运维·服务器
宴之敖者、6 分钟前
Linux——yum和vim
linux·运维·服务器
人道领域7 分钟前
JavaWeb从入门到进阶(Maven依赖管理)
linux·python·maven
大柏怎么被偷了21 分钟前
【Linux】信号
linux·运维·服务器
小安啃代码27 分钟前
在ubuntu中使用wps无法使用宋体
linux·ubuntu·wps
Jia ming29 分钟前
大小端模式:字节顺序的奥秘
linux·运维·服务器
Zach_yuan34 分钟前
Linux 线程入门到理解:从 pthread 使用到线程库底层原理
linux·运维·服务器
YuTaoShao44 分钟前
【LeetCode 每日一题】1895. 最大的幻方——(解法二)前缀和优化
linux·算法·leetcode
小尧嵌入式1 小时前
【Linux开发二】数字反转|除数累加|差分数组|vector插入和访问|小数四舍五入及向上取整|矩阵逆置|基础文件IO|深入文件IO
linux·服务器·开发语言·c++·线性代数·算法·矩阵