随笔分类 -  Kubernetes

Kubernetes杂七杂八
摘要:环境查看 系统环境 # cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) # uname -a Linux CentOS7K8SNode003068 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 1 阅读全文
posted @ 2025-01-23 15:27 minseo 阅读(34) 评论(0) 推荐(0)
摘要:官网地址 https://helm.sh/zh/ 帮助文档地址 https://helm.sh/zh/docs/ Github地址 https://github.com/helm/ 公共库地址 https://artifacthub.io/ 环境查看 系统环境 # cat /etc/redhat-r 阅读全文
posted @ 2025-01-22 10:45 minseo 阅读(343) 评论(0) 推荐(0)
摘要:环境查看 系统环境 # cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) # uname -a Linux CentOS7K8SMaster02062 3.10.0-1160.105.1.el7.x86_64 #1 SMP Th 阅读全文
posted @ 2024-12-11 10:53 minseo 阅读(272) 评论(0) 推荐(0)
摘要:ImagePolicyWebhook用于限制节点调用某个镜像 环境查看 系统环境 # cat /etc/redhat-release Rocky Linux release 9.3 (Blue Onyx) # uname -a Linux Rocky9K8SMaster003021 5.14.0-3 阅读全文
posted @ 2024-11-21 17:18 minseo 阅读(100) 评论(0) 推荐(0)
摘要:故障现象 K8S集群CPU消耗99% 查看是一个pause进程导致 kill进程后过一会会自动启动 故障原因 集群启动了镜像quay.io/pubproxy/pause 的daemonset 并且启动了多个 处理方法 删除所有已quay.io/pubproxy/pause 镜像启动的daemonse 阅读全文
posted @ 2024-11-07 11:50 minseo 阅读(157) 评论(0) 推荐(0)
摘要:故障现象 创建deployment后在对应节点出现多个 Evicted状态的Pod并且持续增加 故障原因 节点磁盘空间不足并且设置了磁盘压力的污点 在Rancher上查看 在master上查看该节点污点情况 解决方法 清理磁盘 去除污点设置 在Rancher上操作 移除污点 在master使用kub 阅读全文
posted @ 2024-11-01 10:56 minseo 阅读(35) 评论(0) 推荐(0)
摘要:需求 k8s集群的config配置文件只能在内网使用,如果把该配置文件复制到外网并且修改地址为外网地址也无法使用 例如从rancher下载config配置文件 执行会报以下错误 # kubectl --kubeconfig=config-rancher get node Unable to conn 阅读全文
posted @ 2024-10-17 11:29 minseo 阅读(103) 评论(0) 推荐(0)
摘要:参考: 安装Docker插件 https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html Unbntu使用Docker调用GPU https://blog.csdn.net/d 阅读全文
posted @ 2024-10-12 11:06 minseo 阅读(530) 评论(0) 推荐(0)
摘要:错误表现 挂载.env为配置文件时被识别成一个文件夹而不是一个文件 错误原因 创建configmap的时候原始文件使用的是env 解决方式 创建configmap的时候需要使用的文件需要修改文件名为挂载的文件名一致 例如本次挂载的文件名是.env则需要在创建configmap的时候原始文件名修改为. 阅读全文
posted @ 2024-10-10 17:59 minseo 阅读(70) 评论(0) 推荐(0)
摘要:环境查看 系统环境 # cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) # uname -a Linux CentOS7K8SMaster01063 3.10.0-1160.108.1.el7.x86_64 #1 SMP Th 阅读全文
posted @ 2024-09-10 09:58 minseo 阅读(90) 评论(0) 推荐(0)
摘要:设置节点为不可调度 # kubectl cordon 172.16.5.103 查看状态为不可调度状态 驱逐Pod 本次node为172.16.5.103 # kubectl drain 172.16.5.103 --force --ignore-daemonsets --delete-local- 阅读全文
posted @ 2024-09-07 09:49 minseo 阅读(119) 评论(0) 推荐(0)
摘要:环境查看 系统环境 # cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) # uname -a Linux CentOS7K8SMaster01005101 3.10.0-1160.114.2.el7.x86_64 #1 SMP 阅读全文
posted @ 2024-09-06 10:07 minseo 阅读(89) 评论(0) 推荐(0)
摘要:使用K8S部署禅道参考 https://www.cnblogs.com/minseo/p/17870641.html 如果想要使用不使用容器内自带的数据库 修改配置文件 找到pvc原始文件位置修改配置文件 修改以下配置文件 # zentao/config/my.php 修改数据库的地址,设置用户名和 阅读全文
posted @ 2024-07-15 17:32 minseo 阅读(60) 评论(0) 推荐(0)
摘要:故障现象 正常配置Ingress后使用域名访问网站504 原因分析 发现pod节点的docker和flanneld网段不在同一个网段 如下图所示 处理过程 重启flanneld和docker后网段还不在同一个网段 发现systemctl的docker配置文件恢复了初始配置 原因是因为把docker从 阅读全文
posted @ 2024-07-15 17:21 minseo 阅读(156) 评论(0) 推荐(0)
摘要:Nginx认证登录参考 https://www.cnblogs.com/minseo/p/9234003.html 使用Ingress代理的站点怎么设置认证 使用密码工具生成密码文件 # htpasswd -c kibana.passwd admin 以上命令意思是给用户名为admin设置一个密码, 阅读全文
posted @ 2024-07-11 14:16 minseo 阅读(122) 评论(0) 推荐(0)
摘要:故障现象 使用Pod启动一个服务,不发送请求Pod正常,只要一发送请求则Pod报错,并且重启Pod # Back-off restarting failed container 排查过程 查看Pod状态发现Pod因为内存溢出重启了 # kubectl get pod -n cloud-prd bin 阅读全文
posted @ 2024-06-25 14:17 minseo 阅读(249) 评论(0) 推荐(0)
摘要:使用命令某个节点ectd不健康 # kubectl get cs NAME STATUS MESSAGE ERROR controller-manager Healthy ok scheduler Healthy ok etcd-0 Healthy {"health":"true"} etcd-1 阅读全文
posted @ 2024-05-17 13:49 minseo 阅读(101) 评论(0) 推荐(0)
摘要:故障现象,把docker从24版本升级至26版本之后从客户端pull nfs-client-provisioner镜像时报错报错信息如下 # docker pull quay.io/external_storage/nfs-client-provisioner:latest latest: Pull 阅读全文
posted @ 2024-05-16 10:20 minseo 阅读(7433) 评论(4) 推荐(0)
摘要:参考: https://hub.docker.com/_/mongo 创建PVC 创建PVC用于数据持久化 # cat mongodb-pvc.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: mongodb-pvc sp 阅读全文
posted @ 2024-03-27 10:47 minseo 阅读(144) 评论(0) 推荐(0)
摘要:参考: https://www.cnblogs.com/pitaiyang/p/17975041 报错信息 nginx-ingress-controller限制上传文件大小为1M如果上传文件大于1M则会在浏览器报以下错误 # Request Entity Too Large 解决方法 修改ingre 阅读全文
posted @ 2024-03-18 17:39 minseo 阅读(691) 评论(0) 推荐(0)