From 13fd6ad44bad5ca774c4e9aa68469f266b092c17 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Fri, 24 Jul 2020 17:42:47 +0900 Subject: [PATCH 1/4] Copy tasks/configure-pod-container/extended-resource.md from en/ directory. --- .../extended-resource.md | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 content/ja/docs/tasks/configure-pod-container/extended-resource.md diff --git a/content/ja/docs/tasks/configure-pod-container/extended-resource.md b/content/ja/docs/tasks/configure-pod-container/extended-resource.md new file mode 100644 index 0000000000..25fa11b0d9 --- /dev/null +++ b/content/ja/docs/tasks/configure-pod-container/extended-resource.md @@ -0,0 +1,145 @@ +--- +title: Assign Extended Resources to a Container +content_type: task +weight: 40 +--- + + + +{{< feature-state state="stable" >}} + +This page shows how to assign extended resources to a Container. + + + + +## {{% heading "prerequisites" %}} + + +{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} + +Before you do this exercise, do the exercise in +[Advertise Extended Resources for a Node](/docs/tasks/administer-cluster/extended-resource-node/). +That will configure one of your Nodes to advertise a dongle resource. + + + + + + +## Assign an extended resource to a Pod + +To request an extended resource, include the `resources:requests` field in your +Container manifest. Extended resources are fully qualified with any domain outside of +`*.kubernetes.io/`. Valid extended resource names have the form `example.com/foo` where +`example.com` is replaced with your organization's domain and `foo` is a +descriptive resource name. + +Here is the configuration file for a Pod that has one Container: + +{{< codenew file="pods/resource/extended-resource-pod.yaml" >}} + +In the configuration file, you can see that the Container requests 3 dongles. + +Create a Pod: + +```shell +kubectl apply -f https://k8s.io/examples/pods/resource/extended-resource-pod.yaml +``` + +Verify that the Pod is running: + +```shell +kubectl get pod extended-resource-demo +``` + +Describe the Pod: + +```shell +kubectl describe pod extended-resource-demo +``` + +The output shows dongle requests: + +```yaml +Limits: + example.com/dongle: 3 +Requests: + example.com/dongle: 3 +``` + +## Attempt to create a second Pod + +Here is the configuration file for a Pod that has one Container. The Container requests +two dongles. + +{{< codenew file="pods/resource/extended-resource-pod-2.yaml" >}} + +Kubernetes will not be able to satisfy the request for two dongles, because the first Pod +used three of the four available dongles. + +Attempt to create a Pod: + +```shell +kubectl apply -f https://k8s.io/examples/pods/resource/extended-resource-pod-2.yaml +``` + +Describe the Pod + +```shell +kubectl describe pod extended-resource-demo-2 +``` + +The output shows that the Pod cannot be scheduled, because there is no Node that has +2 dongles available: + + +``` +Conditions: + Type Status + PodScheduled False +... +Events: + ... + ... Warning FailedScheduling pod (extended-resource-demo-2) failed to fit in any node +fit failure summary on nodes : Insufficient example.com/dongle (1) +``` + +View the Pod status: + +```shell +kubectl get pod extended-resource-demo-2 +``` + +The output shows that the Pod was created, but not scheduled to run on a Node. +It has a status of Pending: + +```yaml +NAME READY STATUS RESTARTS AGE +extended-resource-demo-2 0/1 Pending 0 6m +``` + +## Clean up + +Delete the Pods that you created for this exercise: + +```shell +kubectl delete pod extended-resource-demo +kubectl delete pod extended-resource-demo-2 +``` + + + +## {{% heading "whatsnext" %}} + + +### For application developers + +* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/) +* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/) + +### For cluster administrators + +* [Advertise Extended Resources for a Node](/docs/tasks/administer-cluster/extended-resource-node/) + + From 1cf5310415f06b9c1fa66c165d4f3237a8ab1116 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Fri, 24 Jul 2020 18:49:45 +0900 Subject: [PATCH 2/4] Translate tasks/configure-pod-container/extended-resource into Japanese. --- .../extended-resource.md | 73 +++++++------------ 1 file changed, 26 insertions(+), 47 deletions(-) diff --git a/content/ja/docs/tasks/configure-pod-container/extended-resource.md b/content/ja/docs/tasks/configure-pod-container/extended-resource.md index 25fa11b0d9..89417e7acb 100644 --- a/content/ja/docs/tasks/configure-pod-container/extended-resource.md +++ b/content/ja/docs/tasks/configure-pod-container/extended-resource.md @@ -1,5 +1,5 @@ --- -title: Assign Extended Resources to a Container +title: 拡張リソースをコンテナに割り当てる content_type: task weight: 40 --- @@ -8,58 +8,45 @@ weight: 40 {{< feature-state state="stable" >}} -This page shows how to assign extended resources to a Container. - - - +このページでは、拡張リソースをコンテナに割り当てる方法について説明します。 ## {{% heading "prerequisites" %}} - {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} -Before you do this exercise, do the exercise in -[Advertise Extended Resources for a Node](/docs/tasks/administer-cluster/extended-resource-node/). -That will configure one of your Nodes to advertise a dongle resource. - - - +この練習を始める前に、[Nodeに拡張リソースをアドバタイズする](/docs/tasks/administer-cluster/extended-resource-node/)の練習を行ってください。これにより、Nodeの1つがdongleリソースをアドバタイズするように設定されます。 -## Assign an extended resource to a Pod +## 拡張リソースをPodに割り当てる -To request an extended resource, include the `resources:requests` field in your -Container manifest. Extended resources are fully qualified with any domain outside of -`*.kubernetes.io/`. Valid extended resource names have the form `example.com/foo` where -`example.com` is replaced with your organization's domain and `foo` is a -descriptive resource name. +拡張リソースをリクエストするには、コンテナのマニフェストに`resources:requests`フィールドを含めます。拡張リソースは、`*.kubernetes.io/`以外の任意のドメインで完全修飾されます。有効な拡張リソース名は、`example.com/foo`という形式になります。ここで、`example.com`はあなたの組織のドメインで、`foo`は記述的なリソース名で置き換えます。 -Here is the configuration file for a Pod that has one Container: +1つのコンテナからなるPodの構成ファイルを示します。 {{< codenew file="pods/resource/extended-resource-pod.yaml" >}} -In the configuration file, you can see that the Container requests 3 dongles. +構成ファイルでは、コンテナが3つのdongleをリクエストしていることがわかります。 -Create a Pod: +次のコマンドでPodを作成します。 ```shell kubectl apply -f https://k8s.io/examples/pods/resource/extended-resource-pod.yaml ``` -Verify that the Pod is running: +Podが起動したことを確認します。 ```shell kubectl get pod extended-resource-demo ``` -Describe the Pod: +Podの説明を表示します。 ```shell kubectl describe pod extended-resource-demo ``` -The output shows dongle requests: +dongleのリクエストが表示されます。 ```yaml Limits: @@ -68,31 +55,27 @@ Requests: example.com/dongle: 3 ``` -## Attempt to create a second Pod +## 2つ目のPodの作成を試みる -Here is the configuration file for a Pod that has one Container. The Container requests -two dongles. +以下に、1つのコンテナを持つPodの構成ファイルを示します。コンテナは2つのdongleをリクエストします。 {{< codenew file="pods/resource/extended-resource-pod-2.yaml" >}} -Kubernetes will not be able to satisfy the request for two dongles, because the first Pod -used three of the four available dongles. +Kubernetesは、2つのdongleのリクエストを満たすことができません。1つ目のPodが、利用可能な4つのdongleのうち3つを使用してしまっているためです。 -Attempt to create a Pod: +Podを作成してみます。 ```shell kubectl apply -f https://k8s.io/examples/pods/resource/extended-resource-pod-2.yaml ``` -Describe the Pod +Podの説明を表示します。 ```shell kubectl describe pod extended-resource-demo-2 ``` -The output shows that the Pod cannot be scheduled, because there is no Node that has -2 dongles available: - +出力にはPodがスケジュールできないことが示されます。2つのdongleが利用できるNodeが存在しないためです。 ``` Conditions: @@ -105,41 +88,37 @@ Events: fit failure summary on nodes : Insufficient example.com/dongle (1) ``` -View the Pod status: +Podのステータスを表示します。 ```shell kubectl get pod extended-resource-demo-2 ``` -The output shows that the Pod was created, but not scheduled to run on a Node. -It has a status of Pending: +出力には、Podは作成されたものの、Nodeにスケジュールされなかったことが示されています。PodはPending状態になっています。 ```yaml NAME READY STATUS RESTARTS AGE extended-resource-demo-2 0/1 Pending 0 6m ``` -## Clean up +## クリーンアップ -Delete the Pods that you created for this exercise: +この練習で作成したPodを削除します。 ```shell kubectl delete pod extended-resource-demo kubectl delete pod extended-resource-demo-2 ``` - - ## {{% heading "whatsnext" %}} +### アプリケーション開発者向け -### For application developers +* [コンテナおよびPodへのメモリーリソースの割り当て](/ja/docs/tasks/configure-pod-container/assign-memory-resource/) +* [コンテナおよびPodへのCPUリソースの割り当て](/ja/docs/tasks/configure-pod-container/assign-cpu-resource/) -* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/) -* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/) +### クラスター管理者向け -### For cluster administrators - -* [Advertise Extended Resources for a Node](/docs/tasks/administer-cluster/extended-resource-node/) +* [Nodeに拡張リソースをアドバタイズする](/docs/tasks/administer-cluster/extended-resource-node/) From 39835082314394aa7828569b70c6228c2f271b67 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Tue, 28 Jul 2020 19:22:02 +0900 Subject: [PATCH 3/4] =?UTF-8?q?Change=20'dongle'=20to=20'=E3=83=89?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E3=83=AB'.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ja/docs/tasks/configure-pod-container/extended-resource.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ja/docs/tasks/configure-pod-container/extended-resource.md b/content/ja/docs/tasks/configure-pod-container/extended-resource.md index 89417e7acb..ff1cfc97d6 100644 --- a/content/ja/docs/tasks/configure-pod-container/extended-resource.md +++ b/content/ja/docs/tasks/configure-pod-container/extended-resource.md @@ -14,7 +14,7 @@ weight: 40 {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} -この練習を始める前に、[Nodeに拡張リソースをアドバタイズする](/docs/tasks/administer-cluster/extended-resource-node/)の練習を行ってください。これにより、Nodeの1つがdongleリソースをアドバタイズするように設定されます。 +この練習を始める前に、[Nodeに拡張リソースをアドバタイズする](/docs/tasks/administer-cluster/extended-resource-node/)の練習を行ってください。これにより、Nodeの1つがドングルリソースをアドバタイズするように設定されます。 From c989af577a2e6d9686985f2b288a7f422d58cbe4 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Tue, 28 Jul 2020 19:43:23 +0900 Subject: [PATCH 4/4] Fix links to Japanese docs. --- .../docs/tasks/configure-pod-container/extended-resource.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/ja/docs/tasks/configure-pod-container/extended-resource.md b/content/ja/docs/tasks/configure-pod-container/extended-resource.md index ff1cfc97d6..b056fc7389 100644 --- a/content/ja/docs/tasks/configure-pod-container/extended-resource.md +++ b/content/ja/docs/tasks/configure-pod-container/extended-resource.md @@ -14,7 +14,7 @@ weight: 40 {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} -この練習を始める前に、[Nodeに拡張リソースをアドバタイズする](/docs/tasks/administer-cluster/extended-resource-node/)の練習を行ってください。これにより、Nodeの1つがドングルリソースをアドバタイズするように設定されます。 +この練習を始める前に、[Nodeに拡張リソースをアドバタイズする](/ja/docs/tasks/administer-cluster/extended-resource-node/)の練習を行ってください。これにより、Nodeの1つがドングルリソースをアドバタイズするように設定されます。 @@ -119,6 +119,6 @@ kubectl delete pod extended-resource-demo-2 ### クラスター管理者向け -* [Nodeに拡張リソースをアドバタイズする](/docs/tasks/administer-cluster/extended-resource-node/) +* [Nodeに拡張リソースをアドバタイズする](/ja/docs/tasks/administer-cluster/extended-resource-node/)