文档简介:
使用场景
前提条件
使用示例
获取分析结果
示例1:查询封锁节点的操作者
objectRef.resource:nodes AND requestObject:unschedulable

示例2:查询删除工作负载的操作者
objectRef.resource:deployments AND objectRef.name:"nginx" AND verb:"delete"

示例3:定位 apiserver 限频原因

* | SELECT histogram( cast(__TIMESTAMP__ as timestamp),interval 1 minute) AS time,
COUNT(1) AS qps,userAgent GROUP BY time,userAgent ORDER BY time


I1009 13:13:09.760767 1 request.go:538] Throttling request took 1.393921018s,
request: GET:https://172.16.252.1:443/api/v1/endpoints?limit=500&resourceVersion=1029843735
E1009 13:13:09.766106 1 reflector.go:156] pkg/mod/k8s.io
/client-go@v0.0.0-20191109102209-3c0d1af94be5/tools/cache/reflector.go:108:
Failed to list *v1.Endpoints: endpoints is forbidden: User "system:servi
ceaccount:monitoring:kube-state-metrics" cannot list resource "endpoints"
in API group "" at the cluster scope
* | SELECT histogram( cast(__TIMESTAMP__ as timestamp),interval 1 minute)
AS time, COUNT(1) AS qps,user.username GROUP BY time,user.username ORDER BY time
