差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版 前次修改 | |||
| tech:kubectl [2025/12/06 11:44] – [顯示 K8s 內的 namespace 清單] jonathan | tech:kubectl [2025/12/06 11:57] (目前版本) – [檢查 K8s Cluster 的健康狀態] jonathan | ||
|---|---|---|---|
| 行 6: | 行 6: | ||
| ===== 檢查 K8s Cluster 的健康狀態 ===== | ===== 檢查 K8s Cluster 的健康狀態 ===== | ||
| - | * 參考 - https:// | + | * 檢查 API server< |
| - | * < | + | kubectl get --raw='/ |
| - | $ kubectl get componentstatus | + | |
| - | NAME | + | |
| - | controller-manager | + | |
| - | scheduler | + | |
| - | etcd-0 | + | |
| </ | </ | ||
| + | * ++看實際執行結果|< | ||
| + | jonathan@k3s-master-171: | ||
| + | [+]ping ok | ||
| + | [+]log ok | ||
| + | [+]etcd ok | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | [+]autoregister-completion ok | ||
| + | [+]poststarthook/ | ||
| + | [+]poststarthook/ | ||
| + | healthz check passed | ||
| + | </ | ||
| + | * 檢查 etcd< | ||
| + | kubectl get --raw='/ | ||
| + | </ | ||
| + | * ++看實際執行結果|< | ||
| + | jonathan@k3s-master-171: | ||
| + | ok | ||
| + | </ | ||
| + | * 檢查 kube-system <cli> | ||
| + | kubectl get pods -n kube-system | ||
| + | </ | ||
| + | * ++看實際執行結果|< | ||
| + | jonathan@k3s-master-171: | ||
| + | NAME READY | ||
| + | coredns-64fd4b4794-28wrz | ||
| + | local-path-provisioner-774c6665dc-t8g2l | ||
| + | metrics-server-7bfffcd44-5mkbj | ||
| + | </ | ||
| ===== 讀取 K8s Cluster Name 的方式 ===== | ===== 讀取 K8s Cluster Name 的方式 ===== | ||