Skip to content

Commit 3f4e0b6

Browse files
committed
ADD README-zh.md
1 parent 06af0f4 commit 3f4e0b6

File tree

2 files changed

+53
-3
lines changed

2 files changed

+53
-3
lines changed

README-zh.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Kube Node Metrics
2+
[English Version](README.md)
3+
4+
本项目灵感来源于 [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics)[kubectl](https://github.com/kubernetes/kubectl)
5+
6+
本项目实现了一个暴露 kubernetes 节点资源指标的服务,目前暴露的指标有:
7+
```
8+
kube_node_metrics_cpu_request
9+
kube_node_metrics_cpu_limit
10+
kube_node_metrics_mem_request_bytes
11+
kube_node_metrics_mem_limit_bytes
12+
```
13+
14+
本项目暴露出的资源申请(request)和限制()g(limit)的指标值应该和 `kubectl describe node <node>` 命令的结果相同。
15+
16+
## 快速开始
17+
### 在 Minikube 上试用
18+
请确保你已经安装了 [minikube](https://github.com/kubernetes/minikube)
19+
20+
在你终端中执行下列命令:
21+
```
22+
minikube start
23+
kubectl apply -f deploy.yaml
24+
```
25+
26+
### 在 Kubernetes 上部署
27+
```bash
28+
kubectl apply -f deploy.yaml
29+
```
30+
31+
## 构建
32+
### 手动构建二进制
33+
```bash
34+
go build .
35+
```
36+
37+
### 构建 docker 镜像
38+
```bash
39+
docker build . -t <image>:<tag>
40+
```
41+
42+
## 运维
43+
1. 支持暴露指定前缀的 k8s 节点标签

README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Kube Node Metrics
2+
[中文版](README-zh.md)
23

34
This project is inspired by [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics) and [kubectl](https://github.com/kubernetes/kubectl).
45

@@ -16,6 +17,8 @@ These samples values should be equal to the result of `kubectl describe node <no
1617

1718
### Try in Minikube
1819
Please ensure you have [minikube](https://github.com/kubernetes/minikube) installed.
20+
21+
Run with following commands in your terminal:
1922
```
2023
minikube start
2124
kubectl apply -f deploy.yaml
@@ -26,7 +29,8 @@ kubectl apply -f deploy.yaml
2629
kubectl apply -f deploy.yaml
2730
```
2831

29-
### build manually
32+
## Build
33+
### build binary manually
3034
```bash
3135
go build .
3236
```
@@ -36,6 +40,9 @@ go build .
3640
docker build . -t <image>:<tag>
3741
```
3842

39-
# TODO
40-
1. support custom k8s api server address
43+
## Operating
44+
This exporter also exposed a metric `kube_node_metrics_last_full_sync_ok_time_seconds` which indicates the last full sync timestamp in seconds. You can create alert rule to monitor the exporter health with the expression `time() - kube_node_metrics_last_full_sync_ok_time_seconds > 300` and you will receive alert if the exporter is not sync sucessfully for 300 seconds.
45+
46+
47+
## TODO
4148
1. support exposed node labels match given pattern

0 commit comments

Comments
 (0)