kubectl describe pod -n kube-system <podName>
,通过 Message 字段的描述信息来查看具体被驱逐的原因。kubectl describe pod -n kube-system <podName>
,通过 Events 字段描述的信息来查看具体被驱逐的原因。kubectl describe pod -n kube-system <podName>
查看是否为 OOM,如果是,可以通过提升 memory limits 的数值解决,limits 值最多不超过100M,如果设置为100M仍然出现 OOM,请 提交工单 来寻求帮助。kubectl describe pod -n kube-system <pod 名称>
,查看 Events 字段。若显示如下内容:Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create a sandbox for pod "<pod 名称 >": Error response from daemon: Failed to set projid for /data/docker/overlay2/xxx-init: no space left on device
,则表明容器数据盘已满,清理节点上数据盘后即可恢复。内存(峰值) | CPU(峰值) |
40MiB 左右 | 0.01C |
功能 | 涉及对象 | 涉及操作权限 |
需要采集集群中 pod 数量和 pod 相关信息 | replicasets、deployments和pods | list/watch |
通过访问节点上 kubelet 的 /metrics 端口获取 cadvisor 的指标信息 | nodes、nodes/proxy、nodes/metrics | list/watch/get |
和 cluster-monitor 传递指标数据 | services | list/watch |
上报指标到 hpa-metrics-server | custommetrics | update |
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:name: tke-monitor-agentrules:- apiGroups: ["apps"]resources: ["replicasets"]verbs: ["list", "watch"]- apiGroups: ["apps"]resources: ["deployments"]verbs: ["list", "watch"]- apiGroups: [""]resources: ["nodes", "nodes/proxy", "nodes/metrics"]verbs: ["list", "watch", "get"]- apiGroups: [""]resources: ["services"]verbs: ["list", "watch"]- apiGroups: [""]resources: ["pods"]verbs: ["list", "watch"]- apiGroups: ["monitor.tencent.io"]resources: ["custommetrics"]verbs: ["update"]
本页内容是否解决了您的问题?