开发者社区 > 云原生 > 正文

无法将k8s注入节点CPU故障

问题描述

[root@kube-master-192-168-131-12 ~/chaosblade-0.4.0]$ ./blade create k8s node-cpu fullload --names kube-node-192-168-131-16 --cpu-percent 80 --kubeconfig ~/.kube/config {"code":504,"success":false,"error":"unexpected status, the real value is Error","result":{"uid":"f0456b2b579c6b86","success":false,"error":"unexpected status, the real value is Error","statuses":[{"uid":"3c0911e7-32a9-11ea-a5c8-5254001fcd2f","name":"kube-node-192-168-131-16","state":"Error","kind":"node","error":"nothing returned","success":false,"nodeName":"kube-node-192-168-131-16"}]}}

但是可以使用k8s进行delete pod

[root@kube-master-192-168-131-12 ~/chaosblade-0.4.0]$ ./blade create k8s pod-pod delete --names logging-filebeat-filebeat-v1-0-m527d --namespace kube-system --evict-count 2 --kubeconfig ~/.kube/config {"code":200,"success":true,"result":"6db9b83e0f82d788"}

也可以使用blade进行node cpu 进行故障注入

[root@kube-master-192-168-131-12 ~/chaosblade-0.4.0]$ ./blade create cpu load {"code":200,"success":true,"result":"45474c0669240cb7"}

环境信息

k8s 版本

[root@kube-master-192-168-131-12 ~/chaosblade-0.4.0]$ kubectl version Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.8", GitCommit:"211047e9a1922595eaa3a1127ed365e9299a6c23", GitTreeState:"clean", BuildDate:"2019-10-15T12:11:03Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.8", GitCommit:"211047e9a1922595eaa3a1127ed365e9299a6c23", GitTreeState:"clean", BuildDate:"2019-10-15T12:02:12Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

docker 版本

[root@kube-master-192-168-131-12 ~/chaosblade-0.4.0]$ docker version Client: Version: 18.09.5 API version: 1.39 Go version: go1.10.8 Git commit: e8ff056 Built: Thu Apr 11 04:43:34 2019 OS/Arch: linux/amd64 Experimental: false

Server: Docker Engine - Community Engine: Version: 18.09.5 API version: 1.39 (minimum version 1.12) Go version: go1.10.8 Git commit: e8ff056 Built: Thu Apr 11 04:13:40 2019 OS/Arch: linux/amd64 Experimental: false

helm 版本

[root@kube-master-192-168-131-12 ~/chaosblade-0.4.0]$ helm version version.BuildInfo{Version:"v3.0.2", GitCommit:"19e47ee3283ae98139d98460de796c1be1e3975f", GitTreeState:"clean", GoVersion:"go1.13.5"}

chaosblade-operator

[root@kube-master-192-168-131-12 ~/chaosblade-0.4.0]$ kubectl get pod -n kube-system -o wide | grep chaosblade chaosblade-operator-79ddcf84b4-4g47q 1/1 Running 0 10h 192.168.72.197 kube-node-192-168-131-5 chaosblade-tool-586s2 1/1 Running 0 10h 192.168.131.5 kube-node-192-168-131-5 chaosblade-tool-9msrk 1/1 Running 0 10h 192.168.133.17 kube-node-192-168-133-17 chaosblade-tool-d4pmw 1/1 Running 0 10h 192.168.131.12 kube-master-192-168-131-12 chaosblade-tool-hx2zp 1/1 Running 0 10h 192.168.131.16 kube-node-192-168-131-16 chaosblade-tool-l5cm9 1/1 Running 0 10h 192.168.131.15 kube-node-192-168-131-15 chaosblade-tool-tp4g5 1/1 Running 0 10h 192.168.131.13 kube-master-192-168-131-13 chaosblade-tool-z5p5g 1/1 Running 0 10h 192.168.131.14 kube-master-192-168-131-14

原提问者GitHub用户quanwenqi2

展开
收起
码字王 2023-06-12 17:17:14 124 0
1 条回答
写回答
取消 提交回答
  • 你杀掉的是 kubelet,导致 k8s api 调用不了,所以报了这个错误。

    原回答者GitHub用户xcaspar

    2023-06-12 17:35:16
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关产品

  • 容器服务Kubernetes版
  • 相关电子书

    更多
    ACK 云原生弹性方案—云原生时代的加速器 立即下载
    ACK集群类型选择最佳实践 立即下载
    企业运维之云原生和Kubernetes 实战 立即下载

    相关镜像