k8s的grafana的dashboard指标分析

1. Cluster SLO and Error budget

1.1 Cluster control plane SLO

 

avg(
avg_over_time((sum without ()(kube_pod_container_status_ready{namespace="kube-system",pod=~".*.dashboard.*|.*.dns.*|kube.*|.*.calico.*|.*.flannel.*|.*.etcd.*"}) 
/ 
count without ()(kube_pod_container_status_ready{namespace="kube-system",pod=~".*.dashboard.*|.*.dns.*|kube.*|.*.calico.*|.*.flannel.*|.*.etcd.*"}))[$duration:5m])
)

k8s集群要达到的服务质量目标(SLO)SLO 关注时间

99% 的可用性意味着什么?它不是 1% 的错误率 (失败的 http 响应的百分比),而是在一个预定义的时间段内可用服务的时间百分比。

1.2 Cluster control plane error budget remaining 

(( avg(avg_over_time((sum without ()(kube_pod_container_status_ready{namespace="kube-system",pod=~".*.dashboard.*|.*.dns.*|kube.*|.*.calico.*|.*.flannel.*|.*.etcd.*"}) 
/ 
count without ()(kube_pod_container_status_ready{namespace="kube-system",pod=~".*.dashboard.*|.*.dns.*|kube.*|.*.calico.*|.*.flannel.*|.*.etcd.*"}))[$duration:5m])
)) - 0.98999999999999999 ) 
* 
avg((time() - timestamp(up{job="apiserver",namespace="default",service="kubernetes"} offset $duration)))

 

群集控制平面错误预算剩余

1.3 Promtheus monitoring SLO 

avg(
avg_over_time((sum without ()(kube_pod_status_ready{namespace="monitoring",pod="prometheus-prometheus-operator-prometheus-0",condition="true"}) 
/ 
count without ()(kube_pod_status_ready{namespace="monitoring",pod="prometheus-prometheus-operator-prometheus-0"}))[$duration:5m])
)

 

2. Overall cluster status 

Burstable: pod中只要有一个容器的requestslimits的设置不相同,该pod的QoS即为Burstable。举例如下:

Container bar没有指定resources

 

 

containers:
name: foo
resources:
  limits:
    cpu: 10m
    memory: 1Gi
  requests:
    cpu: 10m
    memory: 1Gi

name: bar

Burstable 举例2:pod中只要有一个容器没有对cpu或者memory中的request和limits都没有明确指定。

 

containers:
name: foo
resources:
  limits:
    memory: 1Gi

name: bar
resources:
  limits:
    cpu: 100m

Burstable 举例3:Container foo没有设置limits,而bar requestslimits均未设置。

 

containers:
name: foo
resources:
  requests:
    cpu: 10m
    memory: 1Gi  
name: bar

Best-Effort:如果对于全部的resources来说requestslimits均未设置,该pod的QoS即为Best-Effort。举例如下:

 

containers:
name: foo
resources:
name: bar
resources:

3.master Node details 

 4. Namespace monitoring details

 

 

5. API Server 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

王伯爵

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值