Skip to content

Commit 895d591

Browse files
committed
Translate concepts/cluster-administration/system-logs into Japanese
1 parent 4201120 commit 895d591

File tree

1 file changed

+40
-56
lines changed

1 file changed

+40
-56
lines changed
Lines changed: 40 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,66 @@
11
---
2-
reviewers:
3-
- dims
4-
- 44past4
5-
title: System Logs
2+
title: システムログ
63
content_type: concept
74
weight: 60
85
---
96

107
<!-- overview -->
118

12-
System component logs record events happening in cluster, which can be very useful for debugging.
13-
You can configure log verbosity to see more or less detail.
14-
Logs can be as coarse-grained as showing errors within a component, or as fine-grained as showing step-by-step traces of events (like HTTP access logs, pod state changes, controller actions, or scheduler decisions).
9+
システムコンポーネントのログは、クラスター内で起こったイベントを記録します。このログはデバッグのために非常に役立ちます。ログのverbosityを設定すると、ログをどの程度詳細に見るのかを変更できます。ログはコンポーネント内のエラーを表示する程度の荒い粒度にすることも、イベントのステップバイステップのトレース(HTTPのアクセスログ、Podの状態の変更、コントローラーの動作、スケジューラーの決定など)を表示するような細かい粒度に設定することもできます。
1510

1611
<!-- body -->
1712

18-
## Klog
13+
## klog
1914

20-
klog is the Kubernetes logging library. [klog](https://github.com/kubernetes/klog)
21-
generates log messages for the Kubernetes system components.
15+
klogは、Kubernetesのログライブラリです。[klog](https://github.com/kubernetes/klog)は、Kubernetesのシステムコンポーネント向けのログメッセージを生成します。
2216

23-
For more information about klog configuration, see the [Command line tool reference](/docs/reference/command-line-tools-reference/).
17+
klogの設定に関する詳しい情報については、[コマンドラインツールのリファレンス](/docs/reference/command-line-tools-reference/)を参照してください。
18+
19+
klogネイティブ形式の例:
2420

25-
An example of the klog native format:
2621
```
2722
I1025 00:15:15.525108 1 httplog.go:79] GET /api/v1/namespaces/kube-system/pods/metrics-server-v0.3.1-57c75779f-9p8wg: (1.512ms) 200 [pod_nanny/v0.0.0 (linux/amd64) kubernetes/$Format 10.56.1.19:51756]
2823
```
2924

30-
### Structured Logging
25+
### 構造化ログ
3126

3227
{{< feature-state for_k8s_version="v1.19" state="alpha" >}}
3328

3429
{{< warning >}}
35-
Migration to structured log messages is an ongoing process. Not all log messages are structured in this version. When parsing log files, you must also handle unstructured log messages.
30+
構造化ログへのマイグレーションは現在進行中の作業です。このバージョンでは、すべてのログメッセージが構造化されているわけではありません。ログファイルをパースする場合、JSONではないログの行にも対処しなければなりません。
3631

37-
Log formatting and value serialization are subject to change.
32+
ログの形式と値のシリアライズは変更される可能性があります。
3833
{{< /warning>}}
3934

40-
Structured logging introduces a uniform structure in log messages allowing for programmatic extraction of information. You can store and process structured logs with less effort and cost.
41-
New message format is backward compatible and enabled by default.
35+
構造化ログは、ログメッセージに単一の構造を導入し、プログラムで情報の抽出ができるようにするものです。構造化ログは、僅かな労力とコストで保存・処理できます。新しいメッセージ形式は後方互換性があり、デフォルトで有効化されます。
4236

43-
Format of structured logs:
37+
構造化ログの形式:
4438

4539
```ini
4640
<klog header> "<message>" <key1>="<value1>" <key2>="<value2>" ...
4741
```
4842

49-
Example:
43+
:
5044

5145
```ini
5246
I1025 00:15:15.525108 1 controller_utils.go:116] "Pod status updated" pod="kube-system/kubedns" status="ready"
5347
```
5448

5549

56-
### JSON log format
50+
### JSONログ形式
5751

5852
{{< feature-state for_k8s_version="v1.19" state="alpha" >}}
5953

6054
{{<warning >}}
61-
JSON output does not support many standard klog flags. For list of unsupported klog flags, see the [Command line tool reference](/docs/reference/command-line-tools-reference/).
55+
JSONの出力は多数の標準のklogフラグをサポートしていません。非対応のklogフラグの一覧については、[コマンドラインツールリファレンス](/docs/reference/command-line-tools-reference/)を参照してください。
6256

63-
Not all logs are guaranteed to be written in JSON format (for example, during process start). If you intend to parse logs, make sure you can handle log lines that are not JSON as well.
57+
すべてのログがJSON形式で書き込むことに対応しているわけではありません(たとえば、プロセスの開始時など)。ログのパースを行おうとしている場合、JSONではないログの行に対処できるようにしてください。
6458

65-
Field names and JSON serialization are subject to change.
59+
フィールド名とJSONのシリアライズは変更される可能性があります。
6660
{{< /warning >}}
6761

68-
The `--logging-format=json` flag changes the format of logs from klog native format to JSON format.
69-
Example of JSON log format (pretty printed):
62+
`--logging-format=json`フラグは、ログの形式をネイティブ形式klogからJSON形式に変更します。以下は、JSONログ形式の例(pretty printしたもの)です。
63+
7064
```json
7165
{
7266
"ts": 1580306777.04728,
@@ -80,63 +74,53 @@ Example of JSON log format (pretty printed):
8074
}
8175
```
8276

83-
Keys with special meaning:
84-
* `ts` - timestamp as Unix time (required, float)
85-
* `v` - verbosity (required, int, default 0)
86-
* `err` - error string (optional, string)
87-
* `msg` - message (required, string)
88-
77+
特別な意味を持つキー:
78+
* `ts` - Unix時間のタイムスタンプ(必須、float)
79+
* `v` - verbosity (必須、int、デフォルトは0)
80+
* `err` - エラー文字列 (オプション、string)
81+
* `msg` - メッセージ (必須、string)
8982

90-
List of components currently supporting JSON format:
83+
現在サポートされているJSONフォーマットの一覧:
9184
* {{< glossary_tooltip term_id="kube-controller-manager" text="kube-controller-manager" >}}
9285
* {{< glossary_tooltip term_id="kube-apiserver" text="kube-apiserver" >}}
9386
* {{< glossary_tooltip term_id="kube-scheduler" text="kube-scheduler" >}}
9487
* {{< glossary_tooltip term_id="kubelet" text="kubelet" >}}
9588

96-
### Log sanitization
89+
### ログのサニタイズ
9790

9891
{{< feature-state for_k8s_version="v1.20" state="alpha" >}}
9992

10093
{{<warning >}}
101-
Log sanitization might incur significant computation overhead and therefore should not be enabled in production.
94+
ログのサニタイズ大きな計算のオーバーヘッドを引き起こす可能性があるため、本番環境では有効にするべきではありません。
10295
{{< /warning >}}
10396

104-
The `--experimental-logging-sanitization` flag enables the klog sanitization filter.
105-
If enabled all log arguments are inspected for fields tagged as sensitive data (e.g. passwords, keys, tokens) and logging of these fields will be prevented.
97+
`--experimental-logging-sanitization`フラグはklogのサニタイズフィルタを有効にします。有効にすると、すべてのログの引数が機密データ(パスワード、キー、トークンなど)としてタグ付けされたフィールドについて検査され、これらのフィールドのログの記録は防止されます。
10698

107-
List of components currently supporting log sanitization:
99+
現在ログのサニタイズをサポートしているコンポーネント一覧:
108100
* kube-controller-manager
109101
* kube-apiserver
110102
* kube-scheduler
111103
* kubelet
112104

113105
{{< note >}}
114-
The Log sanitization filter does not prevent user workload logs from leaking sensitive data.
106+
ログのサニタイズフィルターは、ユーザーのワークロードのログが機密データを漏洩するのを防げるわけではありません。
115107
{{< /note >}}
116108

117-
### Log verbosity level
109+
### ログのverbosityレベル
118110

119-
The `-v` flag controls log verbosity. Increasing the value increases the number of logged events. Decreasing the value decreases the number of logged events.
120-
Increasing verbosity settings logs increasingly less severe events. A verbosity setting of 0 logs only critical events.
111+
`-v`フラグはログのverbosityを制御します。値を増やすとログに記録されるイベントの数が増えます。値を減らすとログに記録されるイベントの数が減ります。verbosityの設定を増やすと、ますます多くの深刻度の低いイベントをログに記録するようになります。verbosityの設定を0にすると、クリティカルなイベントだけをログに記録します。
121112

122-
### Log location
113+
### ログの場所
123114

124-
There are two types of system components: those that run in a container and those
125-
that do not run in a container. For example:
115+
システムコンポーネントには2種類あります。コンテナ内で実行されるコンポーネントと、コンテナ内で実行されないコンポーネントです。たとえば、次のようなコンポーネントがあります。
126116

127-
* The Kubernetes scheduler and kube-proxy run in a container.
128-
* The kubelet and container runtime, for example Docker, do not run in containers.
117+
* Kubernetesのスケジューラーやkube-proxyはコンテナ内で実行されます。
118+
* kubeletやDockerのようなコンテナランタイムはコンテナ内で実行されません。
129119

130-
On machines with systemd, the kubelet and container runtime write to journald.
131-
Otherwise, they write to `.log` files in the `/var/log` directory.
132-
System components inside containers always write to `.log` files in the `/var/log` directory,
133-
bypassing the default logging mechanism.
134-
Similar to the container logs, you should rotate system component logs in the `/var/log` directory.
135-
In Kubernetes clusters created by the `kube-up.sh` script, log rotation is configured by the `logrotate` tool.
136-
The `logrotate` tool rotates logs daily, or once the log size is greater than 100MB.
120+
systemdを使用しているマシンでは、kubeletとコンテナランタイムはjournaldに書き込みを行います。それ以外のマシンでは、`/var/log`ディレクトリ内の`.log`ファイルに書き込みます。コンテナ内部のシステムコンポーネントは、デフォルトのログ機構をバイパスするため、常に`/var/log`ディレクトリ内の`.log`ファイルに書き込みます。コンテナのログと同様に、`/var/log`ディレクトリ内のシステムコンポーネントのログはローテートする必要があります。`kube-up.sh`スクリプトによって作成されたKubernetesクラスターでは、ログローテーションは`logrotate`ツールで設定されます。`logrotate`ツールはログを1日ごとまたはログのサイズが100MBを超えたときにローテートします。
137121

138122
## {{% heading "whatsnext" %}}
139123

140-
* Read about the [Kubernetes Logging Architecture](/docs/concepts/cluster-administration/logging/)
141-
* Read about [Structured Logging](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1602-structured-logging)
142-
* Read about the [Conventions for logging severity](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md)
124+
* [Kubernetesのログのアーキテクチャ](/docs/concepts/cluster-administration/logging/)について読む。
125+
* [構造化ログ](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1602-structured-logging)について読む。
126+
* [ログの深刻度の慣習](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md)について読む。

0 commit comments

Comments
 (0)