Skip to content

Commit 591c664

Browse files
committed
差分翻訳
1 parent b8e8b8c commit 591c664

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

content/ja/ninja-workshops/8-docker-k8s-otel/4-instrument-app-with-otel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ curl http://localhost:8080/hello
120120

121121
トレースログを有効にした場合は、以下のようなトレースがコンソールまたはコレクターログに書き込まれているのを確認できるはずです:
122122

123-
```
123+
```bash
124124
info: Program[0]
125125
/hello endpoint invoked anonymously
126126
Activity.TraceId: c7bbf57314e4856447508cd8addd49b0

content/ja/ninja-workshops/8-docker-k8s-otel/8-deploy-app-k8s.md

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
---
22
title: アプリケーションをK8sにデプロイ
3-
linkTitle: 8. アプリケーショ## DockerイメージをKubernetesにインポート
4-
5-
通常であれば、DockerイメージをDocker Hubなどのリポジトリにプッシュします。
6-
しかし、今回のセッションでは、k3sに直接インポートする回避策を使用します。sにデプロイ
3+
linkTitle: 8. アプリケーションをK8sにデプロイ
74
weight: 8
85
time: 15 minutes
96
---
@@ -60,10 +57,10 @@ docker build -t helloworld:1.2 .
6057
> docker image rm <old image id>
6158
> ```
6259
63-
## Import the Docker Image to Kubernetes
60+
## Docker イメージを Kubernetes にインポート
6461
65-
Normally we’d push our Docker image to a repository such as Docker Hub.
66-
But for this session, we’ll use a workaround to import it to k3s directly.
62+
通常であれば、Docker イメージを Docker Hub などのリポジトリにプッシュします。
63+
しかし、今回のセッションでは、k3s に直接インポートする回避策を使用します。
6764
6865
```bash
6966
cd /home/splunk
@@ -113,8 +110,8 @@ spec:
113110
value: "8080"
114111
```
115112
116-
> [!tip]- What is a Deployment in Kubernetes?
117-
> The deployment.yaml file is a kubernetes config file that is used to define a deployment resource. This file is the cornerstone of managing applications in Kubernetes! The deployment config defines the deployment’s **_desired state_** and Kubernetes then ensures the **_actual_** state matches it. This allows application pods to self-heal and also allows for easy updates or roll backs to applications.
113+
> [!tip]- Kubernetes における Deployment とは?
114+
> deployment.yaml ファイルは、deployment リソースを定義するために使用される kubernetes 設定ファイルです。このファイルは Kubernetes でアプリケーションを管理するための基盤となります!deployment 設定は deployment の**_望ましい状態_**を定義し、Kubernetes が**_実際の_**状態がそれと一致するよう保証します。これにより、アプリケーション pod の自己修復が可能になり、アプリケーションの簡単な更新やロールバックも可能になります。
118115
119116
次に、同じディレクトリに`service.yaml`という名前の 2 つ目のファイルを作成します:
120117

@@ -140,8 +137,8 @@ spec:
140137
protocol: TCP
141138
```
142139

143-
> [!tip]- What is a Service in Kubernetes?
144-
> A Service in Kubernetes is an abstraction layer, working like a middleman, giving you a fixed IP address or DNS name to access your Pods, which stays the same, even if Pods are added, removed, or replaced over time.
140+
> [!tip]- Kubernetes における Service とは?
141+
> Kubernetes の Service は抽象化レイヤーであり、仲介者のような役割を果たします。Pod にアクセスするための固定 IP アドレスや DNS 名を提供し、時間の経過とともに Pod が追加、削除、または交換されても同じままです。
145142

146143
これらのマニフェストファイルを使用してアプリケーションをデプロイできます:
147144

@@ -220,7 +217,7 @@ env:
220217
value: "deployment.environment=otel-$INSTANCE"
221218
```
222219

223-
The complete `deployment.yaml` file should be as follows (with **your** instance name rather than `$INSTANCE`):
220+
完全な`deployment.yaml`ファイルは以下のようになります(`$INSTANCE`ではなく**あなたの**インスタンス名を使用してください):
224221

225222
```yaml
226223
apiVersion: apps/v1
@@ -258,7 +255,7 @@ spec:
258255
value: "deployment.environment=otel-$INSTANCE"
259256
```
260257

261-
Apply the changes with:
258+
以下のコマンドで変更を適用します:
262259

263260
{{< tabs >}}
264261
{{% tab title="Script" %}}
@@ -277,9 +274,9 @@ deployment.apps/helloworld configured
277274
{{% /tab %}}
278275
{{< /tabs >}}
279276

280-
Then use `curl` to generate some traffic.
277+
その後、`curl`を使用してトラフィックを生成します。
281278

282-
After a minute or so, you should see traces flowing in the o11y cloud. But, if you want to see your trace sooner, we have ...
279+
1 分ほど経過すると、o11y cloud でトレースが流れているのが確認できるはずです。ただし、より早くトレースを確認したい場合は、以下の方法があります...
283280

284281
## チャレンジ
285282

@@ -288,16 +285,16 @@ After a minute or so, you should see traces flowing in the o11y cloud. But, if y
288285
<details>
289286
<summary><b>答えを見るにはここをクリック</b></summary>
290287

291-
If you recall in our challenge from Section 4, _Instrument a .NET Application with OpenTelemetry_, we showed you a trick to write traces to the console using the `OTEL_TRACES_EXPORTER` environment variable. We can add this variable to our deployment.yaml, redeploy our application, and tail the logs from our helloworld app so that we can grab the trace id to then find the trace in Splunk Observability Cloud. (In the next section of our workshop, we will also walk through using the debug exporter, which is how you would typically debug your application in a K8s environment.)
288+
セクション 4「.NET Application を OpenTelemetry でインストゥルメントする」のチャレンジで思い出していただければ、`OTEL_TRACES_EXPORTER`環境変数を使って trace を console に書き込むトリックをお見せしました。この変数を deployment.yaml に追加し、アプリケーションを再 deploy して、helloworld アプリから log を tail することで、trace id を取得して Splunk Observability Cloud で trace を見つけることができます。(ワークショップの次のセクションでは、debug exporter の使用についても説明します。これは K8s 環境でアプリケーションを debug する際の典型的な方法です。)
292289

293-
First, open the deployment.yaml file in vi:
290+
まず、vi で deployment.yaml ファイルを開きます:
294291

295292
```bash
296293
vi deployment.yaml
297294
298295
```
299296

300-
Then, add the `OTEL_TRACES_EXPORTER` environment variable:
297+
次に、`OTEL_TRACES_EXPORTER`環境変数を追加します:
301298

302299
```yaml
303300
env:
@@ -318,7 +315,7 @@ env:
318315
value: "otlp,console"
319316
```
320317

321-
Save your changes then redeploy the application:
318+
変更を保存してからアプリケーションを再 deploy します:
322319

323320
{{< tabs >}}
324321
{{% tab title="Script" %}}
@@ -337,7 +334,7 @@ deployment.apps/helloworld configured
337334
{{% /tab %}}
338335
{{< /tabs >}}
339336

340-
Tail the helloworld logs:
337+
helloworld の log を tail します:
341338

342339
{{< tabs >}}
343340
{{% tab title="Script" %}}
@@ -397,6 +394,6 @@ Resource associated with Activity:
397394
{{% /tab %}}
398395
{{< /tabs >}}
399396

400-
Then, in your other terminal window, generate a trace with your curl command. You will see the trace id in the console in which you are tailing the logs. Copy the `Activity.TraceId:` value and paste it into the Trace search field in APM.
397+
次に、別の terminal window で curl コマンドを使って trace を生成します。log を tail している console で trace id が表示されるはずです。`Activity.TraceId:`の値をコピーして、APM の Trace 検索フィールドに貼り付けてください。
401398

402399
</details>

0 commit comments

Comments
 (0)