Skip to content

Commit 0a474e7

Browse files
authored
Merge pull request #30451 from nuka137/pr-1
[ja] Translate setup/best-practices/cluster-large/ into Japanese
2 parents 60564db + 42917dc commit 0a474e7

File tree

1 file changed

+55
-80
lines changed

1 file changed

+55
-80
lines changed
Lines changed: 55 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,98 @@
11
---
2-
title: 大規模クラスタの構築
2+
title: 大規模クラスターの構築
33
weight: 20
44
---
55

6-
## サポート
76

8-
At {{< param "version" >}}, Kubernetes supports clusters with up to 5000 nodes. More specifically, we support configurations that meet *all* of the following criteria:
7+
クラスターはKubernetesのエージェントが動作する(物理もしくは仮想の){{< glossary_tooltip text="ノード" term_id="node" >}}の集合で、{{< glossary_tooltip text="コントロールプレーン" term_id="control-plane" >}}によって管理されます。
8+
Kubernetes {{< param "version" >}} では、最大5000ノードから構成されるクラスターをサポートします。
9+
具体的には、Kubernetesは次の基準を *全て* 満たす構成に対して適用できるように設計されています。
910

10-
* No more than 110 pods per node
11-
* No more than 5000 nodes
12-
* No more than 150000 total pods
13-
* No more than 300000 total containers
11+
* 1ノードにつきPodが110個以上存在しない
12+
* 5000ノード以上存在しない
13+
* Podの総数が150000個以上存在しない
14+
* コンテナの総数が300000個以上存在しない
1415

16+
ノードを追加したり削除したりすることによって、クラスターをスケールできます。
17+
これを行う方法は、クラスターがどのようにデプロイされたかに依存します。
1518

16-
## 構築
1719

18-
A cluster is a set of nodes (physical or virtual machines) running Kubernetes agents, managed by a "master" (the cluster-level control plane).
20+
## クラウドプロバイダーのリソースクォータ {#クォータの問題}
1921

20-
Normally the number of nodes in a cluster is controlled by the value `NUM_NODES` in the platform-specific `config-default.sh` file (for example, see [GCE's `config-default.sh`](https://releases.k8s.io/{{< param "githubbranch" >}}/cluster/gce/config-default.sh)).
22+
クラウドプロバイダーのクォータの問題に遭遇することを避けるため、多数のノードを使ったクラスターを作成するときには次のようなことを考慮してください。
2123

22-
Simply changing that value to something very large, however, may cause the setup script to fail for many cloud providers. A GCE deployment, for example, will run in to quota issues and fail to bring the cluster up.
24+
* 次のようなクラウドリソースの増加をリクエストする
25+
* コンピューターインスタンス
26+
* CPU
27+
* ストレージボリューム
28+
* 使用中のIPアドレス
29+
* パケットフィルタリングのルールセット
30+
* ロードバランサーの数
31+
* ネットワークサブネット
32+
* ログストリーム
33+
* クラウドプロバイダーによる新しいインスタンスの作成に対するレート制限のため、バッチで新しいノードを立ち上げるようなクラスターのスケーリング操作を通すためには、バッチ間ですこし休止を入れます。
2334

24-
When setting up a large Kubernetes cluster, the following issues must be considered.
2535

26-
### クォータの問題
36+
## コントロールプレーンのコンポーネント
2737

28-
To avoid running into cloud provider quota issues, when creating a cluster with many nodes, consider:
38+
大きなクラスターでは、十分な計算とその他のリソースを持ったコントロールプレーンが必要になります。
2939

30-
* Increase the quota for things like CPU, IPs, etc.
31-
* In [GCE, for example,](https://cloud.google.com/compute/docs/resource-quotas) you'll want to increase the quota for:
32-
* CPUs
33-
* VM instances
34-
* Total persistent disk reserved
35-
* In-use IP addresses
36-
* Firewall Rules
37-
* Forwarding rules
38-
* Routes
39-
* Target pools
40-
* Gating the setup script so that it brings up new node VMs in smaller batches with waits in between, because some cloud providers rate limit the creation of VMs.
40+
特に故障ゾーンあたり1つまたは2つのコントロールプレーンインスタンスを動かす場合、最初に垂直方向にインスタンスをスケールし、垂直方向のスケーリングの効果が低下するポイントに達したら水平方向にスケールします。
4141

42-
### Etcdのストレージ
42+
フォールトトレランスを備えるために、1つの故障ゾーンに対して最低1インスタンスを動かすべきです。
43+
Kubernetesノードは、同一故障ゾーン内のコントロールプレーンエンドポイントに対して自動的にトラフィックが向かないようにします。
44+
しかし、クラウドプロバイダーはこれを実現するための独自の機構を持っているかもしれません。
4345

44-
To improve performance of large clusters, we store events in a separate dedicated etcd instance.
46+
例えばマネージドなロードバランサーを使うと、故障ゾーン _A_ にあるkubeletやPodから発生したトラフィックを、同じく故障ゾーン _A_ にあるコントロールプレーンホストに対してのみ送るように設定します。もし1つのコントロールプレーンホストまたは故障ゾーン _A_ のエンドポイントがオフラインになった場合、ゾーン _A_ にあるノードについてすべてのコントロールプレーンのトラフィックはゾーンを跨いで送信されます。それぞれのゾーンで複数のコントロールプレーンホストを動作させることは、結果としてほとんどありません。
4547

46-
When creating a cluster, existing salt scripts:
4748

48-
* start and configure additional etcd instance
49-
* configure api-server to use it for storing events
49+
## etcdストレージ
5050

51-
### マスターのサイズと構成要素
51+
大きなクラスターの性能を向上させるために、他の専用のetcdインスタンスにイベントオブジェクトを保存できます。
5252

53-
On GCE/Google Kubernetes Engine, and AWS, `kube-up` automatically configures the proper VM size for your master depending on the number of nodes
54-
in your cluster. On other providers, you will need to configure it manually. For reference, the sizes we use on GCE are
53+
クラスターを作るときに、(カスタムツールを使って)以下のようなことができます。
5554

56-
* 1-5 nodes: n1-standard-1
57-
* 6-10 nodes: n1-standard-2
58-
* 11-100 nodes: n1-standard-4
59-
* 101-250 nodes: n1-standard-8
60-
* 251-500 nodes: n1-standard-16
61-
* more than 500 nodes: n1-standard-32
55+
* 追加のetcdインスタンスを起動または設定する
56+
* イベントを保存するために{{< glossary_tooltip term_id="kube-apiserver" text="APIサーバ" >}}を設定する
6257

63-
And the sizes we use on AWS are
58+
大きなクラスターのためにetcdを設定・管理する詳細については、[Operating etcd clusters for Kubernetes](/docs/tasks/administer-cluster/configure-upgrade-etcd/)または[kubeadmを使用した高可用性etcdクラスターの作成](/ja/docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm/)を見てください。
6459

65-
* 1-5 nodes: m3.medium
66-
* 6-10 nodes: m3.large
67-
* 11-100 nodes: m3.xlarge
68-
* 101-250 nodes: m3.2xlarge
69-
* 251-500 nodes: c4.4xlarge
70-
* more than 500 nodes: c4.8xlarge
7160

72-
{{< note >}}
73-
On Google Kubernetes Engine, the size of the master node adjusts automatically based on the size of your cluster. For more information, see [this blog post](https://cloudplatform.googleblog.com/2017/11/Cutting-Cluster-Management-Fees-on-Google-Kubernetes-Engine.html).
61+
## アドオンのリソース
7462

75-
On AWS, master node sizes are currently set at cluster startup time and do not change, even if you later scale your cluster up or down by manually removing or adding nodes or using a cluster autoscaler.
76-
{{< /note >}}
63+
Kubernetesの[リソース制限](/ja/docs/concepts/configuration/manage-resources-containers/)は、メモリリークの影響やPodやコンテナが他のコンポーネントに与える他の影響を最小化することに役立ちます。
64+
これらのリソース制限は、アプリケーションのワークロードに適用するのと同様に、{{< glossary_tooltip text="アドオン" term_id="addons" >}}のリソースにも適用されます。
7765

78-
### アドオンのリソース
79-
80-
To prevent memory leaks or other resource issues in [cluster addons](https://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons) from consuming all the resources available on a node, Kubernetes sets resource limits on addon containers to limit the CPU and Memory resources they can consume (See PR [#10653](https://pr.k8s.io/10653/files) and [#10778](https://pr.k8s.io/10778/files)).
81-
82-
For example:
66+
例えば、ロギングコンポーネントに対してCPUやメモリ制限を設定できます。
8367

8468
```yaml
69+
...
8570
containers:
8671
- name: fluentd-cloud-logging
87-
image: k8s.gcr.io/fluentd-gcp:1.16
72+
image: fluent/fluentd-kubernetes-daemonset:v1
8873
resources:
8974
limits:
9075
cpu: 100m
9176
memory: 200Mi
9277
```
9378
94-
Except for Heapster, these limits are static and are based on data we collected from addons running on 4-node clusters (see [#10335](https://issue.k8s.io/10335#issuecomment-117861225)). The addons consume a lot more resources when running on large deployment clusters (see [#5880](http://issue.k8s.io/5880#issuecomment-113984085)). So, if a large cluster is deployed without adjusting these values, the addons may continuously get killed because they keep hitting the limits.
79+
アドオンのデフォルト制限は、アドオンを小~中規模のKubernetesクラスターで動作させたときの経験から得られたデータに基づきます。
80+
大規模のクラスターで動作させる場合は、アドオンはデフォルト制限よりも多くのリソースを消費することが多いです。
81+
これらの値を調整せずに大規模のクラスターをデプロイした場合、メモリー制限に達し続けるため、アドオンが継続的に停止されるかもしれません。
82+
あるいは、CPUのタイムスライス制限により性能がでない状態で動作するかもしれません。
83+
84+
クラスターのアドオンのリソース制限に遭遇しないために、多くのノードで構成されるクラスターを構築する場合は次のことを考慮します。
9585
96-
To avoid running into cluster addon resource issues, when creating a cluster with many nodes, consider the following:
86+
* いくつかのアドオンは垂直方向にスケールします - クラスターに1つのレプリカ、もしくは故障ゾーン全体にサービングされるものがあります。このようなアドオンでは、クラスターをスケールアウトしたときにリクエストと制限を増やす必要があります。
87+
* 数多くのアドオンは、水平方向にスケールします - より多くのPod数を動作させることで性能を向上できます - ただし、とても大きなクラスターではCPUやメモリの制限も少し引き上げる必要があるかもしれません。VerticalPodAutoscalerは、提案されたリクエストや制限の数値を提供する `_recommender_` モードで動作可能です。
88+
* いくつかのアドオンは{{< glossary_tooltip text="DaemonSet" term_id="daemonset" >}}によって制御され、1ノードに1つ複製される形で動作します: 例えばノードレベルのログアグリゲーターです。水平方向にスケールするアドオンの場合と同様に、CPUやメモリ制限を少し引き上げる必要があるかもしれません。
9789

98-
* Scale memory and CPU limits for each of the following addons, if used, as you scale up the size of cluster (there is one replica of each handling the entire cluster so memory and CPU usage tends to grow proportionally with size/load on cluster):
99-
* [InfluxDB and Grafana](https://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml)
100-
* [kubedns, dnsmasq, and sidecar](https://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/kube-dns/kube-dns.yaml.in)
101-
* [Kibana](https://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/fluentd-elasticsearch/kibana-deployment.yaml)
102-
* Scale number of replicas for the following addons, if used, along with the size of cluster (there are multiple replicas of each so increasing replicas should help handle increased load, but, since load per replica also increases slightly, also consider increasing CPU/memory limits):
103-
* [elasticsearch](https://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/fluentd-elasticsearch/es-statefulset.yaml)
104-
* Increase memory and CPU limits slightly for each of the following addons, if used, along with the size of cluster (there is one replica per node but CPU/memory usage increases slightly along with cluster load/size as well):
105-
* [FluentD with ElasticSearch Plugin](https://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml)
106-
* [FluentD with GCP Plugin](https://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml)
10790

108-
Heapster's resource limits are set dynamically based on the initial size of your cluster (see [#16185](http://issue.k8s.io/16185)
109-
and [#22940](http://issue.k8s.io/22940)). If you find that Heapster is running
110-
out of resources, you should adjust the formulas that compute heapster memory request (see those PRs for details).
91+
## {{% heading "whatsnext" %}}
11192

112-
For directions on how to detect if addon containers are hitting resource limits, see the
113-
[Troubleshooting section of Compute Resources](/docs/concepts/configuration/manage-resources-containers/#troubleshooting).
93+
`VerticalPodAutoscaler` は、リソースのリクエストやPodの制限についての管理を手助けするためにクラスターへデプロイ可能なカスタムリソースです。
94+
`VerticalPodAutoscaler` やクラスターで致命的なアドオンを含むクラスターコンポーネントをスケールする方法についてさらに知りたい場合は[Vertical Pod Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#readme)をご覧ください。
11495

115-
### 少数のノードの起動の失敗を許容する
96+
[cluster autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler#readme)は、クラスターで要求されるリソース水準を満たす正確なノード数で動作できるよう、いくつかのクラウドプロバイダーと統合されています。
11697

117-
For various reasons (see [#18969](https://github.com/kubernetes/kubernetes/issues/18969) for more details) running
118-
`kube-up.sh` with a very large `NUM_NODES` may fail due to a very small number of nodes not coming up properly.
119-
Currently you have two choices: restart the cluster (`kube-down.sh` and then `kube-up.sh` again), or before
120-
running `kube-up.sh` set the environment variable `ALLOWED_NOTREADY_NODES` to whatever value you feel comfortable
121-
with. This will allow `kube-up.sh` to succeed with fewer than `NUM_NODES` coming up. Depending on the
122-
reason for the failure, those additional nodes may join later or the cluster may remain at a size of
123-
`NUM_NODES - ALLOWED_NOTREADY_NODES`.
98+
[addon resizer](https://github.com/kubernetes/autoscaler/tree/master/addon-resizer#readme)は、クラスターのスケールが変化したときにアドオンの自動的なリサイズをお手伝いします。

0 commit comments

Comments
 (0)