Skip to content

Commit f878f94

Browse files
committed
Translate concepts/services-networking/service-topology into Japanese.
1 parent 3b2e7d4 commit f878f94

File tree

1 file changed

+32
-90
lines changed

1 file changed

+32
-90
lines changed
Lines changed: 32 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
2-
reviewers:
3-
- johnbelamaric
4-
- imroc
5-
title: Service Topology
2+
title: Serviceトポロジー
63
feature:
7-
title: Service Topology
4+
title: Serviceトポロジー
85
description: >
9-
Routing of service traffic based upon cluster topology.
10-
6+
Serviceのトラフィックをクラスタートポロジーに基づいてルーティングします。
117
content_type: concept
128
weight: 10
139
---
@@ -17,96 +13,47 @@ weight: 10
1713

1814
{{< feature-state for_k8s_version="v1.17" state="alpha" >}}
1915

20-
_Service Topology_ enables a service to route traffic based upon the Node
21-
topology of the cluster. For example, a service can specify that traffic be
22-
preferentially routed to endpoints that are on the same Node as the client, or
23-
in the same availability zone.
24-
25-
16+
*Serviceトポロジー*を利用すると、Serviceのトラフィックをクラスターのノードトポロジーに基づいてルーティングできるようになります。たとえば、あるServiceのトラフィックに対して、できるだけ同じノードや同じアベイラビリティゾーン上にあるエンドポイントを優先してルーティングするように指定できます。
2617

2718
<!-- body -->
2819

29-
## Introduction
30-
31-
By default, traffic sent to a `ClusterIP` or `NodePort` Service may be routed to
32-
any backend address for the Service. Since Kubernetes 1.7 it has been possible
33-
to route "external" traffic to the Pods running on the Node that received the
34-
traffic, but this is not supported for `ClusterIP` Services, and more complex
35-
topologies &mdash; such as routing zonally &mdash; have not been possible. The
36-
_Service Topology_ feature resolves this by allowing the Service creator to
37-
define a policy for routing traffic based upon the Node labels for the
38-
originating and destination Nodes.
39-
40-
By using Node label matching between the source and destination, the operator
41-
may designate groups of Nodes that are "closer" and "farther" from one another,
42-
using whatever metric makes sense for that operator's requirements. For many
43-
operators in public clouds, for example, there is a preference to keep service
44-
traffic within the same zone, because interzonal traffic has a cost associated
45-
with it, while intrazonal traffic does not. Other common needs include being able
46-
to route traffic to a local Pod managed by a DaemonSet, or keeping traffic to
47-
Nodes connected to the same top-of-rack switch for the lowest latency.
48-
20+
## はじめに
4921

50-
## Using Service Topology
22+
デフォルトでは、`ClusterIP``NodePort`Serviceに送信されたトラフィックは、Serviceに対応する任意のバックエンドのアドレスにルーティングされる可能性があります。しかし、Kubernetes 1.7以降では、「外部の」トラフィックをそのトラフィックを受信したノード上のPodにルーティングすることが可能になりました。しかし、この機能は`ClusterIP`Serviceでは対応しておらず、ゾーン内ルーティングなどのより複雑なトポロジーは実現不可能でした。*Serviceトポロジー*の機能を利用すれば、Serviceの作者が送信元ノードと送信先ノードのNodeのラベルに基づいてトラフィックをルーティングするためのポリシーを定義できるようになるため、この問題を解決できます。
5123

52-
If your cluster has Service Topology enabled, you can control Service traffic
53-
routing by specifying the `topologyKeys` field on the Service spec. This field
54-
is a preference-order list of Node labels which will be used to sort endpoints
55-
when accessing this Service. Traffic will be directed to a Node whose value for
56-
the first label matches the originating Node's value for that label. If there is
57-
no backend for the Service on a matching Node, then the second label will be
58-
considered, and so forth, until no labels remain.
24+
送信元と送信先の間のNodeラベルのマッチングを使用することにより、オペレーターは、そのオペレーターの要件に適したメトリクスを使用して、お互いに「より近い」または「より遠い」ノードのグループを指定できます。たとえば、パブリッククラウド上のさまざまなオペレーターでは、Serviceのトラフィックを同一ゾーン内に留めようとする傾向があります。パブリッククラウドでは、ゾーンをまたぐトラフィックでは関連するコストがかかる一方、ゾーン内のトラフィックにはコストがかからない場合があるからです。その他のニーズとしては、DaemonSetが管理するローカルのPodにトラフィックをルーティングできるようにしたり、レイテンシーを低く抑えるために同じラック上のスイッチに接続されたノードにトラフィックを限定したいというものがあります。
5925

60-
If no match is found, the traffic will be rejected, just as if there were no
61-
backends for the Service at all. That is, endpoints are chosen based on the first
62-
topology key with available backends. If this field is specified and all entries
63-
have no backends that match the topology of the client, the service has no
64-
backends for that client and connections should fail. The special value `"*"` may
65-
be used to mean "any topology". This catch-all value, if used, only makes sense
66-
as the last value in the list.
26+
## Serviceトポロジーを利用する
6727

68-
If `topologyKeys` is not specified or empty, no topology constraints will be applied.
28+
クラスターのServiceトポロジーが有効になっていれば、Serviceのspecに`topologyKeys`フィールドを指定することで、Serviceのトラフィックのルーティングを制御できます。このフィールドは、Nodeラベルの優先順位リストで、このServiceにアクセスするときにエンドポイントをソートするために使われます。Traffic will be directed to a Node whose value for the first label matches the originating Node's value for that label.一致したノード上にServiceに対応するバックエンドが存在しなかった場合は、2つ目のラベルについて検討が行われ、同様に、残っているラベルが順番に検討されまます。
6929

70-
Consider a cluster with Nodes that are labeled with their hostname, zone name,
71-
and region name. Then you can set the `topologyKeys` values of a service to direct
72-
traffic as follows.
30+
一致するキーが1つも見つからなかった場合、トラフィックは、Serviceに対応するバックエンドが存在しなかったかのように拒否されます。言い換えると、エンドポイントは、利用可能なバックエンドが存在する最初のトポロジーキーに基づいて選択されます。このフィールドが指定され、すべてのエントリーでクライアントのトポロジーに一致するバックエンドが存在しない場合、そのクライアントに対するバックエンドが存在しないものとしてコネクションが失敗します。「任意のトポロジー」を意味する特別な値`"*"`を指定することもできます。任意の値にマッチするこの値に意味があるのは、リストの最後の値として使った場合だけです。
7331

74-
* Only to endpoints on the same node, failing if no endpoint exists on the node:
75-
`["kubernetes.io/hostname"]`.
76-
* Preferentially to endpoints on the same node, falling back to endpoints in the
77-
same zone, followed by the same region, and failing otherwise: `["kubernetes.io/hostname",
78-
"topology.kubernetes.io/zone", "topology.kubernetes.io/region"]`.
79-
This may be useful, for example, in cases where data locality is critical.
80-
* Preferentially to the same zone, but fallback on any available endpoint if
81-
none are available within this zone:
82-
`["topology.kubernetes.io/zone", "*"]`.
32+
`topologyKeys`が未指定または空の場合、トポロジーの制約は適用されません。
8333

34+
ホスト名、ゾーン名、リージョン名のラベルが付いたノードを持つクラスターについて考えてみましょう。このとき、Serviceの`topologyKeys`の値を設定することで、トラフィックの向きを以下のように制御できます。
8435

36+
* トラフィックを同じノード上のエンドポイントのみに向け、同じノード上にエンドポイントが1つも存在しない場合には失敗するようにする: `["kubernetes.io/hostname"]`
37+
* 同一ノード上のエンドポイントを優先し、失敗した場合には同一ゾーン上のエンドポイント、同一リージョンゾーンのエンドポイントへとフォールバックし、それ以外の場合には失敗する: `["kubernetes.io/hostname", "topology.kubernetes.io/zone", "topology.kubernetes.io/region"]`。これは、たとえばデータのローカリティが非常に重要である場合などに役に立ちます。
38+
* 同一ゾーンを優先しますが、ゾーン内に利用可能なノードが存在しない場合は、利用可能な任意のエンドポイントにフォールバックする: `["topology.kubernetes.io/zone", "*"]`
8539

86-
## Constraints
40+
## 制約
8741

88-
* Service topology is not compatible with `externalTrafficPolicy=Local`, and
89-
therefore a Service cannot use both of these features. It is possible to use
90-
both features in the same cluster on different Services, just not on the same
91-
Service.
42+
* Serviceトポロジーは`externalTrafficPolicy=Local`と互換性がないため、Serviceは2つの機能を同時に利用できません。2つの機能を同じクラスター上の異なるServiceでそれぞれ利用することは可能ですが、同一のService上では利用できません。
9243

93-
* Valid topology keys are currently limited to `kubernetes.io/hostname`,
94-
`topology.kubernetes.io/zone`, and `topology.kubernetes.io/region`, but will
95-
be generalized to other node labels in the future.
44+
* 有効なトポロジーキーは、現在は`kubernetes.io/hostname``topology.kubernetes.io/zone`、および`topology.kubernetes.io/region`に限定されています。しかし、将来は一般化され、他のノードラベルも使用できるようになる予定です。
9645

97-
* Topology keys must be valid label keys and at most 16 keys may be specified.
46+
* トポロジーキーは有効なラベルのキーでなければならず、最大で16個のキーまで指定できます。
9847

99-
* The catch-all value, `"*"`, must be the last value in the topology keys, if
100-
it is used.
48+
* すべての値をキャッチする`"*"`を使用する場合は、トポロジーキーの最後の値として指定しなければなりません。
10149

50+
##
10251

103-
## Examples
52+
以下では、Serviceトポロジーの機能を利用したよくある例を紹介します。
10453

105-
The following are common examples of using the Service Topology feature.
54+
### ノードローカルのエンドポイントだけを使用する
10655

107-
### Only Node Local Endpoints
108-
109-
A Service that only routes to node local endpoints. If no endpoints exist on the node, traffic is dropped:
56+
ノードローカルのエンドポイントのみにルーティングするServiceの例です。もし同一ノード上にエンドポイントが存在しない場合、トラフィックは損失します。
11057

11158
```yaml
11259
apiVersion: v1
@@ -124,9 +71,9 @@ spec:
12471
- "kubernetes.io/hostname"
12572
```
12673
127-
### Prefer Node Local Endpoints
74+
### ノードローカルのエンドポイントを優先して使用する
12875
129-
A Service that prefers node local Endpoints but falls back to cluster wide endpoints if node local endpoints do not exist:
76+
ノードローカルのエンドポイントを優先して使用しますが、ノードローカルのエンドポイントが存在しない場合にはクラスター全体のエンドポイントにフォールバックするServiceの例です。
13077
13178
```yaml
13279
apiVersion: v1
@@ -146,10 +93,9 @@ spec:
14693
```
14794
14895
149-
### Only Zonal or Regional Endpoints
150-
151-
A Service that prefers zonal then regional endpoints. If no endpoints exist in either, traffic is dropped.
96+
### 同一ゾーンや同一リージョンのエンドポイントだけを使用する
15297
98+
同一リージョンのエンドポイントより同一ゾーンのエンドポイントを優先するServiceの例です。もしいずれのエンドポイントも存在しない場合、トラフィックは損失します。
15399
154100
```yaml
155101
apiVersion: v1
@@ -168,9 +114,9 @@ spec:
168114
- "topology.kubernetes.io/region"
169115
```
170116
171-
### Prefer Node Local, Zonal, then Regional Endpoints
117+
### ノードローカル、同一ゾーン、同一リーションのエンドポイントを優先して使用する
172118
173-
A Service that prefers node local, zonal, then regional endpoints but falls back to cluster wide endpoints.
119+
ノードローカル、同一ゾーン、同一リージョンのエンドポイントを順番に優先し、クラスター全体のエンドポイントにフォールバックするServiceの例です。
174120
175121
```yaml
176122
apiVersion: v1
@@ -191,13 +137,9 @@ spec:
191137
- "*"
192138
```
193139
194-
195-
196-
197140
## {{% heading "whatsnext" %}}
198141
199-
200-
* Read about [enabling Service Topology](/docs/tasks/administer-cluster/enabling-service-topology)
201-
* Read [Connecting Applications with Services](/docs/concepts/services-networking/connect-applications-service/)
142+
* [Serviceトポトジーを有効にする](/docs/tasks/administer-cluster/enabling-service-topology)を読む。
143+
* [アプリケーションをServiceと接続する](/ja/docs/concepts/services-networking/connect-applications-service/)を読む。
202144
203145

0 commit comments

Comments
 (0)