(→실행예시) |
|||
5번째 줄: | 5번째 줄: | ||
kubectl proxy & | kubectl proxy & | ||
NODE=노드명 | NODE=노드명 | ||
curl http:// | curl http://127.0.0.1:8001/api/v1/nodes/$NODE/proxy/metrics/cadvisor | ||
</syntaxhighlight> | </syntaxhighlight> | ||
22번째 줄: | 22번째 줄: | ||
<syntaxhighlight lang='console'> | <syntaxhighlight lang='console'> | ||
$ NODE=node01 | $ NODE=node01 | ||
$ curl http:// | $ curl http://127.0.0.1:8001/api/v1/nodes/$NODE/proxy/metrics/cadvisor | ||
... | ... | ||
# HELP machine_swap_bytes Amount of swap memory available on the machine. | # HELP machine_swap_bytes Amount of swap memory available on the machine. |
2024년 9월 26일 (목) 16:43 판
1 개요
- kubectl proxy 통해 cadvisor 메트릭 조회
Bash
Copy
kubectl proxy &
NODE=노드명
curl http://127.0.0.1:8001/api/v1/nodes/$NODE/proxy/metrics/cadvisor
2 실행예시
Console
Copy
$ kubectl get no
NAME STATUS ROLES AGE VERSION
controlplane Ready control-plane 16d v1.30.0
node01 Ready <none> 16d v1.30.0
Console
Copy
$ kubectl proxy &
[1] 5138
Starting to serve on 127.0.0.1:8001
Console
Copy
$ NODE=node01
$ curl http://127.0.0.1:8001/api/v1/nodes/$NODE/proxy/metrics/cadvisor
...
# HELP machine_swap_bytes Amount of swap memory available on the machine.
# TYPE machine_swap_bytes gauge
machine_swap_bytes{boot_id="9780a0ea-9032-48c7-beb3-308732e2e5aa",machine_id="388a2d0f867a4404bc12a0093bd9ed8d",system_uuid="d727cefa-564a-43a0-8f5b-5f07eb547378"} 0
Console
Copy
$ pkill kubectl
[1]+ Terminated kubectl proxy
3 같이 보기
4 참고
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.