kubernetes
hkNaruto
这个作者很懒,什么都没留下…
展开
-
k8s 不停服 重置 deployment pod对应的restart count
kubectl rollout restart deployment -n my-namespace xxx-deployment原创 2022-03-14 09:33:31 · 823 阅读 · 0 评论 -
k8s deployment pod 强制、尽量分散在不同的node上
kind: DeploymentapiVersion: apps/v1metadata: name: springboot-web-app1 labels: k8s-app: springboot-web-app1spec: replicas: 5 template: spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredD.原创 2022-03-11 14:01:49 · 3072 阅读 · 1 评论 -
k8s docker memory limits oom分析、docker status MEM USAGE采样来源分析
k8s内存限制配置spec: template: spec: containers: - name: xxx image: xxx resources: limits: memory: 2Gi等同docker rundocker run -m 2G xxx准备分析环境docker run --rm -it -m 2G centos:7 /b原创 2022-02-11 15:06:54 · 1708 阅读 · 0 评论 -
k8s 部署 fastdfs遇到的故障 response status 52 不= 0 fdfs_recv_response fail, result: 52
故障[root@fastdfs-0 /]# fdfs_test /etc/fdfs/client.conf upload a.txtThis is FastDFS client test program v6.07Copyright (C) 2008, Happy Fish / YuQingFastDFS may be copied only under the terms of the GNU GeneralPublic License V3, which may be found in原创 2021-12-28 09:55:54 · 800 阅读 · 0 评论 -
k8s基于curl实现的livenessProbe readinessProbe
livenessProbe: initialDelaySeconds: 60 periodSeconds: 5 timeoutSeconds: 3 successThreshold: 1 failureThreshold: 3 exec: command: - /bin/sh - -c ...原创 2021-11-26 14:58:31 · 2019 阅读 · 1 评论 -
kube-flannel-ds-arm64 Terminated: OOMKilled
过程 登录对应节点查看pod状态kubectl describe pod -n kube-system kube-flannel-ds-arm64-2xmrg其中有Last State: Terminated Reason: OOMKilled Exit Code: 137 Started: Fri, 26 Nov 2021 10:57:14 +0800 Finished: Fri, 26 N..原创 2021-11-26 11:15:35 · 796 阅读 · 0 评论 -
k8s 不停服重启pod方法
登录dashboard,修改deployment,随便加上一个无意义的环境变量,通过更新deployment方式重启pod,重启过程中服务不会中断,等同滚动升级。原创 2021-08-18 15:26:55 · 1101 阅读 · 0 评论 -
k8s glusterfs failed to get the port number for remote subvolume. Please run ‘gluster volume status‘
错误信息warning(combined from similar events): MountVolume.SetUp failed for volume "pvc-448a0c86-fc65-447d-aad7-5db11144b056" : mount failed: mount failed: exit status 1 Mounting command: systemd-run Mounting arguments: --description=Kubernetes transient原创 2021-07-29 11:25:56 · 764 阅读 · 0 评论 -
helm Error: UPGRADE FAILED: pre-upgrade hooks failed: timed out waiting for the condition
helm upgrade --install xxx . \ --timeout 600s注意要加上单位s原创 2021-07-19 09:08:03 · 3419 阅读 · 0 评论 -
解决EFK Kibana unindexed fields cannot be searched 导致View surrounding documentsView不能过滤k8s-app字段
参考下图,刷新index patterns刷新后,可以看到Fields增加了十多页此时View surrounding documentsView功能中的过滤器就可以选择kubernetes.labels.k8s-app等字段进行过滤原创 2021-07-08 16:09:56 · 715 阅读 · 0 评论 -
heketi glusterfs k8s 新增硬盘 扩容
1. glusterfs节点主机增加一块100G 硬盘 /dev/sdb2. 登陆k8s dashboard,编辑heketi-config-secret,如下3. 增加/dev/sdb,注意/dev/sda后面要加上","4. 登陆到heketi pod,查看配置已经发生变化5. 重新load topology6. 查看更新后的topology info(heketi-cli --server http://localhost:8080 --user xx --secr原创 2021-05-20 09:13:40 · 855 阅读 · 1 评论 -
k8s 网络原理
pod网络原创 2021-04-28 16:43:16 · 325 阅读 · 0 评论 -
k8s haproxy Unable to connect to the server: x509: certificate is valid for 127.0.0.1, 10.0.1.12
kubeasz 启用ex-lb故障Unable to connect to the server: x509: certificate is valid for 127.0.0.1, 10.0.1.12, 10.0.110.30, 10.68.0.1, 10.1.1.1, not 10.0.110.12编辑/etc/kubernetes/ssl/kubernetes-csr.json添加ip10.0.110.12 到 hosts重新生成 kubernets证书和密钥/opt/kub.原创 2021-04-19 11:07:30 · 2487 阅读 · 0 评论 -
k8s harpoxy kube-apiserver curl PR_END_OF_FILE_ERROR Encountered end of file
故障# curl -k -v https://127.0.0.1:8443/* About to connect() to 127.0.0.1 port 8443 (#0)* Trying 127.0.0.1...* Connected to 127.0.0.1 (127.0.0.1) port 8443 (#0)* Initializing NSS with certpath: sql:/etc/pki/nssdb* NSS error -5938 (PR_END_OF_FILE_ER原创 2021-04-19 10:12:38 · 1486 阅读 · 0 评论 -
arm64 CentOS 虚拟化环境 k8s NodeHasNoDiskPressure NodeHasSufficientMemory
Normal NodeHasNoDiskPressure 5m10s (x79 over 46h) kubelet, 10.0.0.2 Node 10.0.0.2 status is now: NodeHasNoDiskPressure Normal NodeHasSufficientMemory 9s (x85 over 46h) kubelet, 10.0.0.2 Node 10.0.0.2 status is now: NodeHasSufficientMemo...原创 2021-04-16 09:35:29 · 4604 阅读 · 0 评论 -
CentOS kubeasz The ipaddr filter requires python‘s netaddr be installed on the ansible controller
yum install python-netaddr -y原创 2021-04-14 11:15:22 · 1404 阅读 · 2 评论 -
CentOS7 AltArch aarch64环境kubeasz flannel : 轮询等待flannel 运行,视下载镜像速度而定
故障TASK [flannel : 检查是否已下载离线flannel镜像] ******************************************************************************************************************changed: [192.168.111.193]TASK [flannel : 尝试推送离线docker 镜像(若执行失败,可忽略)] ****************************原创 2020-09-01 16:20:07 · 919 阅读 · 1 评论 -
CentOS7 AltArch aarch64环境静态编译cfssl1.2.0(kubeasz项目依赖的二进制程序)
下载源码wget https://codeload.github.com/cloudflare/cfssl/tar.gz/1.2.0 -O cfssl-1.2.0.tar.gztar -xvf cfssl-1.2.0.tar.gz设置代理go env -w GO111MODULE=ongo env -w GOPROXY=https://goproxy.io,directricecd cfssl-1.2.0go get github.com/GeertJohan/go.ric原创 2020-08-31 16:09:40 · 780 阅读 · 0 评论 -
Fedora 31 上用minkube部署一个单节点kubernetes并测试基础kubectl指令
下载minkube[yeqiang@localhost ~]$ cd Downloads/[yeqiang@localhost Downloads]$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 % Total % Received % Xferd Average Speed Time Time Time Current原创 2020-06-04 12:21:53 · 987 阅读 · 0 评论 -
Kubernetes5--弹性伸缩1
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本文链接:https://blog.csdn.net/u014106644/article/details/84528572参考论文:[1]杨茂. 基于Kubernetes的容器自动伸缩技术的研究[D].西安邮电大学,2018.Kubernetes的弹性伸缩技术k...转载 2019-11-07 10:42:02 · 223 阅读 · 0 评论