微服务》》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": {
    
  }
}
相关推荐
snow@li12 分钟前
服务器运维:Alibaba Cloud Linux 4 LTS 64位 根目录全景深度解析文章
linux·运维·服务器
苏生Susheng34 分钟前
【软件实施】Linux企业运维常用命令手册
java·linux·运维·服务器·springboot·springcloud·软件实施
额额额对了36 分钟前
Linux 进程间通信(IPC)核心机制:消息队列、共享内存与信号量详解
linux·网络·网络协议
zx_741484811 小时前
【Linux入门】Linux 安装:VMware Workstation Pro 安装 CentOS 7 保姆级图文教程
linux·centos
智购科技无人售货机厂家2 小时前
2026自动售货机备用电池管理系统设计:从充放电保护到健康监测的工程实践~YH
大数据·linux·单片机·嵌入式硬件·微信
小雪崩2 小时前
嵌入式学习 day39:TCP并发服务器模型
linux·服务器·c语言·网络·学习·tcp/ip
spencer_tseng2 小时前
[j2cache ehcache.xml]/tmp/.ehcache-diskstore.lock (Permission denied)
xml·linux·python·ehcache·[j2cache
内核笔记2 小时前
休眠唤醒 standby 调试
linux·bsp
小白不想画工图2 小时前
银河麒麟V10系统安装QT5.12
linux·开发语言·qt·银河麒麟
IT爱学堂3 小时前
新版Linux零基础入门到高手Rocky版本-替换CentOS(完结)
linux·运维·centos