Skip to content

Commit b5cfdb8

Browse files
ptuxriita10069
andauthored
[ja] Translate tasks/debug-application-cluster/monitor-node-health into Japanese (#31108)
* done * Update content/ja/docs/tasks/debug-application-cluster/monitor-node-health.md Co-authored-by: Ryota Yamada <[email protected]> * Update content/ja/docs/tasks/debug-application-cluster/monitor-node-health.md Co-authored-by: Ryota Yamada <[email protected]> * Update content/ja/docs/tasks/debug-application-cluster/monitor-node-health.md Co-authored-by: Ryota Yamada <[email protected]> * Update content/ja/docs/tasks/debug-application-cluster/monitor-node-health.md Co-authored-by: Ryota Yamada <[email protected]> * Update content/ja/docs/tasks/debug-application-cluster/monitor-node-health.md Co-authored-by: Ryota Yamada <[email protected]> * Update content/ja/docs/tasks/debug-application-cluster/monitor-node-health.md Co-authored-by: Ryota Yamada <[email protected]> * minor change Co-authored-by: Ryota Yamada <[email protected]>
1 parent 3d7ebfc commit b5cfdb8

File tree

1 file changed

+151
-0
lines changed

1 file changed

+151
-0
lines changed
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
title: ノードの健全性を監視します
3+
content_type: task
4+
reviewers:
5+
- ptux
6+
---
7+
8+
<!-- overview -->
9+
10+
*Node Problem Detector*は、ノードの健全性を監視し、報告するためのデーモンです。
11+
`Node Problem Detector``DaemonSet`として、あるいはスタンドアロンデーモンとして実行することができます。
12+
13+
`Node Problem Detector`は様々なデーモンからノードの問題に関する情報を収集し、これらの状態を[NodeCondition](/ja/docs/concepts/architecture/nodes/#condition)および[Event](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#event-v1-core)としてAPIサーバーにレポートします。
14+
`Node Problem Detector`のインストール方法と使用方法については、[Node Problem Detectorプロジェクトドキュメント](https://github.com/kubernetes/node-problem-detector)を参照してください。
15+
16+
## {{% heading "prerequisites" %}}
17+
18+
{{< include "task-tutorial-prereqs.md" >}}
19+
20+
<!-- steps -->
21+
22+
## 制限事項
23+
24+
* Node Problem Detectorは、ファイルベースのカーネルログのみをサポートします。
25+
`journald`のようなログツールはサポートされていません。
26+
27+
* Node Problem Detectorは、カーネルの問題を報告するためにカーネルログフォーマットを使用します。
28+
カーネルログフォーマットを拡張する方法については、[Add support for another log format](#support-other-log-format) を参照してください。
29+
30+
## ノード問題検出の有効化
31+
32+
クラウドプロバイダーによっては、`Node Problem Detector`を{{< glossary_tooltip text="Addon" term_id="addons" >}}として有効にしている場合があります。
33+
また、`kubectl`を使って`Node Problem Detector`を有効にするか、`Addon pod`を作成することで有効にできます。
34+
35+
### kubectlを使用してNodしますroblem Detectorを有効にします {#using-kubectl}
36+
37+
`kubectl``Node Problem Detector`を最も柔軟に管理することができます。
38+
デフォルトの設定を上書きして自分の環境に合わせたり、カスタマイズしたノードの問題を検出したりすることができます。
39+
例えば:
40+
41+
1. `node-problem-detector.yaml`のような`Node Problem Detector`の設定を作成します:
42+
43+
{{< codenew file="debug/node-problem-detector.yaml" >}}
44+
45+
{{< note >}}
46+
システムログのディレクトリが、お使いのOSのディストリビューションに合っていることを確認する必要があります。
47+
{{< /note >}}
48+
49+
1. `Node Problem Detector``kubectl`で起動します。
50+
51+
```shell
52+
kubectl apply -f https://k8s.io/examples/debug/node-problem-detector.yaml
53+
```
54+
55+
### Addon podを使用してNode Problem Detectorを有効化します {#using-addon-pod}
56+
57+
カスタムのクラスターブートストラップソリューションを使用していて、デフォルトの設定を上書きする必要がない場合は、`Addon Pod`を利用してデプロイをさらに自動化できます。
58+
`node-problem-detector.yaml`を作成し、制御プレーンノードの`Addon Pod`のディレクトリ`/etc/kubernetes/addons/node-problem-detector`に設定を保存します。
59+
60+
## コンフィギュレーションを上書きします
61+
62+
`Node Problem Detector`の Dockerイメージをビルドする際に、[default configuration(https://github.com/kubernetes/node-problem-detector/tree/v0.1/config)が埋め込まれます。
63+
64+
[`ConfigMap`](/ja/docs/tasks/configure-pod-container/configure-pod-configmap/) を使用することで設定を上書きすることができます。
65+
66+
67+
1. `config/` にある設定ファイルを変更します
68+
1. `ConfigMap` `node-problem-detector-config`を作成します。
69+
70+
```shell
71+
kubectl create configmap node-problem-detector-config --from-file=config/
72+
```
73+
74+
1. `node-problem-detector.yaml`を変更して、`ConfigMap`を使用するようにします。
75+
76+
{{< codenew file="debug/node-problem-detector-configmap.yaml" >}}
77+
78+
1. 新しい設定ファイルで`Node Problem Detector`を再作成します。
79+
80+
```shell
81+
# If you have a node-problem-detector running, delete before recreating
82+
kubectl delete -f https://k8s.io/examples/debug/node-problem-detector.yaml
83+
kubectl apply -f https://k8s.io/examples/debug/node-problem-detector-configmap.yaml
84+
```
85+
86+
{{< note >}}
87+
この方法は `kubectl` で起動された Node Problem Detector にのみ適用されます。
88+
{{< /note >}}
89+
90+
ノード問題検出装置がクラスターアドオンとして実行されている場合、設定の上書きはサポートされていません。
91+
`Addon Manager`は、`ConfigMap`をサポートしていません。
92+
93+
## Kernel Monitor
94+
95+
*Kernel Monitor*`Node Problem Detector`でサポートされるシステムログ監視デーモンです。
96+
*Kernel Monitor*はカーネルログを監視し、事前に定義されたルールに従って既知のカーネル問題を検出します。
97+
*Kernel Monitor*[`config/kernel-monitor.json`](https://github.com/kubernetes/node-problem-detector/blob/v0.1/config/kernel-monitor.json)にある一連の定義済みルールリストに従ってカーネルの問題を照合します。
98+
ルールリストは拡張可能です。設定を上書きすることで、ルールリストを拡張することができます。
99+
100+
### 新しいNodeConditionsの追加
101+
102+
新しい`NodeCondition`をサポートするには、例えば`config/kernel-monitor.json``conditions`フィールド内に条件定義を作成します。
103+
104+
```json
105+
{
106+
"type": "NodeConditionType",
107+
"reason": "CamelCaseDefaultNodeConditionReason",
108+
"message": "arbitrary default node condition message"
109+
}
110+
```
111+
112+
### 新たな問題の発見
113+
114+
新しい問題を検出するために、`config/kernel-monitor.json``rules`フィールドを新しいルール定義で拡張することができます。
115+
116+
```json
117+
{
118+
"type": "temporary/permanent",
119+
"condition": "NodeConditionOfPermanentIssue",
120+
"reason": "CamelCaseShortReason",
121+
"message": "regexp matching the issue in the kernel log"
122+
}
123+
```
124+
125+
### カーネルログデバイスのパスの設定 {#kernel-log-device-path}
126+
127+
ご使用のオペレーティングシステム(OS)ディストリビューションのカーネルログパスをご確認ください。
128+
Linuxカーネルの[ログデバイス](https://www.kernel.org/doc/Documentation/ABI/testing/dev-kmsg)は通常`/dev/kmsg`として表示されます。
129+
しかし、OSのディストリビューションによって、ログパスの位置は異なります。
130+
`config/kernel-monitor.json``log`フィールドは、コンテナ内のログパスを表します。
131+
`log`フィールドは、`Node Problem Detector`で見たデバイスパスと一致するように設定することができます。
132+
133+
### 別のログ形式をサポートします {#support-other-log-format}
134+
135+
Kernel monitorは[`Translator`](https://github.com/kubernetes/node-problem-detector/blob/v0.1/pkg/kernelmonitor/translator/translator.go)プラグインを使用して、カーネルログの内部データ構造を変換します。
136+
新しいログフォーマット用に新しいトランスレータを実装することができます。
137+
138+
<!-- discussion -->
139+
140+
## 推奨・制限事項
141+
142+
ノードの健全性を監視するために、クラスターでNode Problem Detectorを実行することが推奨されます。
143+
`Node Problem Detector`を実行する場合、各ノードで余分なリソースのオーバーヘッドが発生することが予想されます。
144+
145+
通常これは問題ありません。
146+
147+
* カーネルログは比較的ゆっくりと成長します。
148+
* Node Problem Detector にはリソース制限が設定されています。
149+
* 高負荷時であっても、リソースの使用は許容範囲内です。
150+
151+
詳細は`Node Problem Detector`[ベンチマーク結果](https://github.com/kubernetes/node-problem-detector/issues/2#issuecomment-220255629)を参照してください。

0 commit comments

Comments
 (0)