微服务》》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": {
    
  }
}
相关推荐
驱动探索者4 分钟前
USB ADB 简介
linux·adb·驱动·usb
dessler2 小时前
Hadoop HDFS-部署和基本操作
linux·运维·hdfs
风静雪冷2 小时前
find命令解读
linux
小米里的大麦3 小时前
026 inode 与软硬链接
linux
₯㎕星空&繁华4 小时前
Linux-地址空间
linux·运维·服务器·经验分享·笔记
小米里的大麦4 小时前
023 基础 IO —— 重定向
linux
风铃7774 小时前
c/c++ Socket+共享内存实现本机进程间通信
linux·c语言
lsnm6 小时前
【LINUX网络】HTTP协议基本结构、搭建自己的HTTP简单服务器
linux·运维·服务器·c语言·网络·c++·http
杜大帅锅6 小时前
Linux搭建ftp服务器
linux·运维·服务器
运维自动化&云计算7 小时前
Centos虚拟机硬盘报错,根分区满,已用显示为负40G
linux·运维·centos