随笔 - 121  文章 - 0  评论 - 2  阅读 - 68745 

随笔分类 -  K8S

K8S中 安装k8sgpt用于分析微服务问题
摘要:1、先安装prometheus-operator和Ollama大模型服务【这里忽略】 2、安装k8sgpt-operator helm repo add k8sgpt https://charts.k8sgpt.ai/helm repo updatehelm install release k8sg 阅读全文
posted @ 2024-08-09 17:28 MhaiM 阅读(172) 评论(0) 推荐(0) 编辑
普通用户使用kubectl 提示没权限问题处理
摘要:1、创建kubectl目录 mkdir -p /home/meta/bin 2、拷贝 kubectl 文件到/home/meta/bin 下 3、配置/etc/profile echo "export PATH="$PATH:/home/meta/bin"" >> /etc/profile 4、测试 阅读全文
posted @ 2024-08-01 11:13 MhaiM 阅读(102) 评论(0) 推荐(0) 编辑
openEuler 系统 kubeadm 源码编译报错./hack/run-in-gopath.sh: line 34: _output/bin/prerelease-lifecycle-gen: Permission denied
摘要:1、安装如下依赖并授予权限重新编译即可 yum install rsync jq -y && chmod +x _output/bin/prereleaselifecycle-gen 阅读全文
posted @ 2024-07-27 09:19 MhaiM 阅读(35) 评论(0) 推荐(0) 编辑
k8s通过api接口删除实例
摘要:1、开启代理 kubectl proxy --port=8001 2、 删除pod 资源curl 127.0.0.1:8001/api/v1/namespaces/default/pods/nginx-78dc966569-d2bnh -XDELETE 或者 curl --cacert /etc/k 阅读全文
posted @ 2024-07-19 10:12 MhaiM 阅读(20) 评论(0) 推荐(0) 编辑
CCE集群节点配置镜像加速
摘要:1、/etc/sysconfig/docker 如下修改添加镜像加速器--registry-mirror=https://b9pmyelo.mirror.aliyuncs.com 并重启docker服务即可 阅读全文
posted @ 2024-07-18 11:42 MhaiM 阅读(29) 评论(0) 推荐(0) 编辑
CPUThrottlingHigh 异常处理
摘要:现象: CPUThrottlingHigh 1、分析原因: 限制值设置过低,导致容器cpu 限流了 2、处理方案: 调整容器限制值即可 阅读全文
posted @ 2024-06-19 15:40 MhaiM 阅读(87) 评论(0) 推荐(0) 编辑
The API server is burning too much error budget 异常处理
摘要:1、现象: The API server is burning too much error budget 2、分析原因: 查看事件信息,提示就绪探针检查失败,按照常规存活探针也需要探测并重启服务的 3、处理方案: 需优化apisever的探针配置 阅读全文
posted @ 2024-06-14 09:03 MhaiM 阅读(137) 评论(0) 推荐(0) 编辑
容器网络流量转发分析
摘要:1、docker容器 bridge网络模式【docker】 #同一节点不同容器流量转发 1.1、通过 iptables -t nat -nvL|grep 6008 查看端口服务的转发规则,可查到对应的容器ip、端口和网卡 1.2、查看容器路由表,172.17.0.x 目标网段,流量会从eth0出去和 阅读全文
posted @ 2024-05-01 19:51 MhaiM 阅读(134) 评论(0) 推荐(0) 编辑
etcd集群节点扩容【二进制】
摘要:1、更新etcd集群证书信息 #生成新证书cfssl gencert -initca ca-csr.json | cfssljson -bare ca -cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profi 阅读全文
posted @ 2024-04-25 16:34 MhaiM 阅读(166) 评论(0) 推荐(0) 编辑
df-pv 工具查看pvc,pv 容量使用情况
摘要:1、下载安装地址: wget https://github.com/yashbhutwala/kubectl-df-pv/releases/download/v0.3.0/kubectl-df-pv_v0.3.0_linux_amd64.tar.gz tar -xvf kubectl-df-pv_v 阅读全文
posted @ 2024-03-22 23:12 MhaiM 阅读(178) 评论(0) 推荐(0) 编辑
基于现有k8S 集群 CA 证书更新100年
摘要:#先提前编译kubeadm到100年 1、先备份 conf文件和证书文件 cp -rp /etc/kubernetes/ /etc/kubernetes.bak 2、生成新的crt 证书,默认在/etc/kubernetes/pki 路径 #先停止所有节点kubelet服务并删除所有节点原来的配置 阅读全文
posted @ 2024-03-03 20:20 MhaiM 阅读(309) 评论(0) 推荐(0) 编辑
kubelet 证书过期处理
摘要:现象:执行openssl x509 -in /var/lib/kubelet/pki/kubelet-client-current.pem -noout -text |grep ' Not' 提示时间已经过期了,节点Notready 处理方案: #master节点kubelet证书生成 1、移除 k 阅读全文
posted @ 2024-02-29 09:42 MhaiM 阅读(454) 评论(0) 推荐(0) 编辑
apiserver 报 Unable to authenticate the request" err="[invalid bearer token, service account token is not valid yet]" 异常处理
摘要:1、现象:apiserver 日志报 Unable to authenticate the request" err="[invalid bearer token, service account token is not valid yet]" 2、分析原因:K8S集群证书过期,导致网络插件异常, 阅读全文
posted @ 2024-02-28 20:01 MhaiM 阅读(1656) 评论(0) 推荐(0) 编辑
K8S 集群组件内存-CPU过高排查方法
摘要:1、查看服务进程,并跟踪程序系统调用 pgrep kubelet #查看资源占用情况 top -p 95786 strace -cp 95786 #显示时间戳 strace -tt -p 95786 2、用pprof 性能分析工具排查 #提前安装go 环境 2.1、#kubelet 开启debug/ 阅读全文
posted @ 2024-02-05 20:56 MhaiM 阅读(323) 评论(0) 推荐(0) 编辑
使用Volcano调度工作负载
摘要:背景: Volcano是一个基于Kubernetes的批处理平台,提供了高性能任务调度引擎、高性能异构芯片管理、高性能任务运行管理等通用计算能力,通过接入AI、大数据、基因、渲染等诸多行业计算框架服务终端用户,并针对计算型应用提供了作业调度、作业管理、队列管理等多项功能。一般情况下,Kubernet 阅读全文
posted @ 2023-12-20 10:57 MhaiM 阅读(204) 评论(0) 推荐(0) 编辑
Unhandled exception. System.IO.IOException: The configured user limit (128) on the number of inotify instances 处理
摘要:现象:Unhandled exception. System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached, or the per-process 阅读全文
posted @ 2023-12-13 15:01 MhaiM 阅读(911) 评论(0) 推荐(0) 编辑
k8s:通过 kubectl 插件 Kubepug 实现集群升级检查(废弃API资源检查)
摘要:背景:k8s 的版本迭代很快,虽然主要版本一直没有变化,但是次要版本一直在迭代,2022年一年就发布了三个次要版本,同时不同的次要版本之间 API 资源一直在变化,有新加入的,也有废弃删除的。不同版本的 api 资源版本也有不同,往往不是向下兼容的,比如在低版本中 API 资源版本为 v1beta1 阅读全文
posted @ 2023-12-09 11:58 MhaiM 阅读(40) 评论(0) 推荐(0) 编辑
默认使用bridge网络模式 nerdctl run -d 报"failed to call cni.Setup: plugin type=\"bridge\" failed (add) 问题处理
摘要:背景:执行 nerdctl run -d --name nginx -p8080:80 nginx 时,报如下错误 FATA[0000] failed to create shim task: OCI runtime create failed: runc create failed: unable 阅读全文
posted @ 2023-12-08 15:40 MhaiM 阅读(687) 评论(0) 推荐(0) 编辑
apisix etcd 出现NOSPACE问题处理
摘要:现象: 执行 ETCDCTL_API=3 /opt/etcd/bin/etcdctl --endpoints="http://apisix-etcd-0.apisix-etcd-headless.ingress-apisix.svc.cluster.local:2379,http://apisix- 阅读全文
posted @ 2023-11-10 17:37 MhaiM 阅读(403) 评论(0) 推荐(0) 编辑
/var/lib/docker/overlay2/41a765b3cfaa278a67414c5b89234adfdebac7182d4bcd1e7c8a2c6ac250dfb7-init/merged: no such file or directory 异常处理
摘要:现象:Error: Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/41a765b3cfaa278a67414c5b89234adfdebac7182d4bcd1e7c8a2c6 阅读全文
posted @ 2023-11-06 10:58 MhaiM 阅读(286) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示