2024-4-7 myluzh Kubernetes
0x01 故障 集群中一个deployment中有很多Evicted的pod root@iZbp12bkuvg20e1j3y9gtxZ:~# kubectl get pod -n base-ops NAME READY STATUS RESTARTS AGE registry-6d7b7c9fb4-22f2x 0/1 Evicted 0 10d registry-6d7b7c9fb4-24r7j 0/1 Evicted 0 10d registry-6d7b7c9fb4-25clg 0/1 Evicted 0 10d ... 0x02 原因 原因:由于node节点的磁盘或内存资源不够后将现有的pod进行了驱赶。可以把磁盘资源释放后,批量删除Evicted Pod kubectl -n base-ops get pods | grep Evicted | awk '{print$1}' |xargs kubectl -n base-...2024-2-23 myluzh Kubernetes
0x00 前言 最近遇到一个问题:客户端上传大一点的文件,http就直接响应Status Code: 413 Request Entity Too Large 由于k8s ingress的上游还有一个nginx,所以先判断是不是nginx限制了上传大小, nginx配置文件client_max_body_size没有问题,那就是ingress-nginx限制了大小,所以就有了下面这篇文章... root@iZbp12bkuvg20e1j3y9gtvZ:/etc/nginx/conf.d# grep "client_max_body_size" *.conf prd-all.conf: client_max_body_size 100m; test-all.conf: client_max_body_size 100m; 0x01 单个Ingress资源调整请求体大小限制 在Kubernetes中,当使用Nginx Ingress Controller时,若需要调整请求体大小限制,您可以直接在Ingress资源中添加相应的annotations。 1、编辑Ingress资源...标签: nginx Ingress client_max_body_size annotations proxy-body-size
2024-2-17 myluzh Kubernetes
0x01 故障描述 ranhcer UI 无法进入,查看logs提示X509 certificate has expired or is not yet valid # 查看 rancher agent 日志 root@iZbp1bddlmdujngbc11omnZ:~# docker logs -f --tail 10 b109 time="2024-02-17T03:26:04Z" level=fatal msg="Server certificate is not valid, please check if the host has the correct time configured and if the server certificate has a notAfter date and time in the future. Certificate information is displayed above. error: Get \"https://172.30.233.87:8443\": x509: certificate has expired or is not yet valid: curren...标签: rancher