2024年12月7日土曜日

k8s(metrics server)

1)yamlファイルをダウンロードする
curl -LO https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

2)以下、追加する

spec:
containers:
- args:
- --cert-dir=/tmp
- --secure-port=10250
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --kubelet-use-node-status-port
- --metric-resolution=15s
- --kubelet-insecure-tls # この行を追加




3)以下のkubectlコマンドで各種リソースの確認ができる
(grafanaでも見れるけど、一応入れてみた)

kubectl top nodes 
kubectl top pods -A



0 件のコメント:

コメントを投稿

Pod Security Admission

[用途] ルール対象外のマニフェストをデプロイさせないための 防止策で利用するイメージになる [検証] 以下のコマンドを投入する kubectl label ns default pod-security.kubernetes.io/warn=baseline [各種コマンドの意...