From fe2e63d8e86180d8e995eec43dad199d45ecb1ad Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Tue, 27 Apr 2021 11:17:35 +0000 Subject: [PATCH 1/5] Copy content/ja/docs/tasks/network/{_index,validate-dual-stack}.md --- content/ja/docs/tasks/network/_index.md | 6 + .../docs/tasks/network/validate-dual-stack.md | 237 ++++++++++++++++++ 2 files changed, 243 insertions(+) create mode 100755 content/ja/docs/tasks/network/_index.md create mode 100644 content/ja/docs/tasks/network/validate-dual-stack.md diff --git a/content/ja/docs/tasks/network/_index.md b/content/ja/docs/tasks/network/_index.md new file mode 100755 index 0000000000..0dad8191a0 --- /dev/null +++ b/content/ja/docs/tasks/network/_index.md @@ -0,0 +1,6 @@ +--- +title: "Networking" +description: Learn how to configure networking for your cluster. +weight: 160 +--- + diff --git a/content/ja/docs/tasks/network/validate-dual-stack.md b/content/ja/docs/tasks/network/validate-dual-stack.md new file mode 100644 index 0000000000..bc90dea4ea --- /dev/null +++ b/content/ja/docs/tasks/network/validate-dual-stack.md @@ -0,0 +1,237 @@ +--- +reviewers: +- lachie83 +- khenidak +- bridgetkromhout +min-kubernetes-server-version: v1.20 +title: Validate IPv4/IPv6 dual-stack +content_type: task +--- + + +This document shares how to validate IPv4/IPv6 dual-stack enabled Kubernetes clusters. + + +## {{% heading "prerequisites" %}} + + +* Provider support for dual-stack networking (Cloud provider or otherwise must be able to provide Kubernetes nodes with routable IPv4/IPv6 network interfaces) +* A [network plugin](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) that supports dual-stack (such as Kubenet or Calico) +* [Dual-stack enabled](/docs/concepts/services-networking/dual-stack/) cluster + +{{< version-check >}} + + + + + +## Validate addressing + +### Validate node addressing + +Each dual-stack Node should have a single IPv4 block and a single IPv6 block allocated. Validate that IPv4/IPv6 Pod address ranges are configured by running the following command. Replace the sample node name with a valid dual-stack Node from your cluster. In this example, the Node's name is `k8s-linuxpool1-34450317-0`: + +```shell +kubectl get nodes k8s-linuxpool1-34450317-0 -o go-template --template='{{range .spec.podCIDRs}}{{printf "%s\n" .}}{{end}}' +``` +``` +10.244.1.0/24 +a00:100::/24 +``` +There should be one IPv4 block and one IPv6 block allocated. + +Validate that the node has an IPv4 and IPv6 interface detected. Replace node name with a valid node from the cluster. In this example the node name is `k8s-linuxpool1-34450317-0`: + +```shell +kubectl get nodes k8s-linuxpool1-34450317-0 -o go-template --template='{{range .status.addresses}}{{printf "%s: %s\n" .type .address}}{{end}}' +``` +``` +Hostname: k8s-linuxpool1-34450317-0 +InternalIP: 10.240.0.5 +InternalIP: 2001:1234:5678:9abc::5 +``` + +### Validate Pod addressing + +Validate that a Pod has an IPv4 and IPv6 address assigned. Replace the Pod name with a valid Pod in your cluster. In this example the Pod name is `pod01`: + +```shell +kubectl get pods pod01 -o go-template --template='{{range .status.podIPs}}{{printf "%s\n" .ip}}{{end}}' +``` +``` +10.244.1.4 +a00:100::4 +``` + +You can also validate Pod IPs using the Downward API via the `status.podIPs` fieldPath. The following snippet demonstrates how you can expose the Pod IPs via an environment variable called `MY_POD_IPS` within a container. + +``` + env: + - name: MY_POD_IPS + valueFrom: + fieldRef: + fieldPath: status.podIPs +``` + +The following command prints the value of the `MY_POD_IPS` environment variable from within a container. The value is a comma separated list that corresponds to the Pod's IPv4 and IPv6 addresses. + +```shell +kubectl exec -it pod01 -- set | grep MY_POD_IPS +``` +``` +MY_POD_IPS=10.244.1.4,a00:100::4 +``` + +The Pod's IP addresses will also be written to `/etc/hosts` within a container. The following command executes a cat on `/etc/hosts` on a dual stack Pod. From the output you can verify both the IPv4 and IPv6 IP address for the Pod. + +```shell +kubectl exec -it pod01 -- cat /etc/hosts +``` +``` +# Kubernetes-managed hosts file. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +10.244.1.4 pod01 +a00:100::4 pod01 +``` + +## Validate Services + +Create the following Service that does not explicitly define `.spec.ipFamilyPolicy`. Kubernetes will assign a cluster IP for the Service from the first configured `service-cluster-ip-range` and set the `.spec.ipFamilyPolicy` to `SingleStack`. + +{{< codenew file="service/networking/dual-stack-default-svc.yaml" >}} + +Use `kubectl` to view the YAML for the Service. + +```shell +kubectl get svc my-service -o yaml +``` + +The Service has `.spec.ipFamilyPolicy` set to `SingleStack` and `.spec.clusterIP` set to an IPv4 address from the first configured range set via `--service-cluster-ip-range` flag on kube-controller-manager. + +```yaml +apiVersion: v1 +kind: Service +metadata: + name: my-service + namespace: default +spec: + clusterIP: 10.0.217.164 + clusterIPs: + - 10.0.217.164 + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - port: 80 + protocol: TCP + targetPort: 9376 + selector: + app: MyApp + sessionAffinity: None + type: ClusterIP +status: + loadBalancer: {} +``` + +Create the following Service that explicitly defines `IPv6` as the first array element in `.spec.ipFamilies`. Kubernetes will assign a cluster IP for the Service from the IPv6 range configured `service-cluster-ip-range` and set the `.spec.ipFamilyPolicy` to `SingleStack`. + +{{< codenew file="service/networking/dual-stack-ipfamilies-ipv6.yaml" >}} + +Use `kubectl` to view the YAML for the Service. + +```shell +kubectl get svc my-service -o yaml +``` + +The Service has `.spec.ipFamilyPolicy` set to `SingleStack` and `.spec.clusterIP` set to an IPv6 address from the IPv6 range set via `--service-cluster-ip-range` flag on kube-controller-manager. + +```yaml +apiVersion: v1 +kind: Service +metadata: + labels: + app: MyApp + name: my-service +spec: + clusterIP: fd00::5118 + clusterIPs: + - fd00::5118 + ipFamilies: + - IPv6 + ipFamilyPolicy: SingleStack + ports: + - port: 80 + protocol: TCP + targetPort: 80 + selector: + app: MyApp + sessionAffinity: None + type: ClusterIP +status: + loadBalancer: {} +``` + +Create the following Service that explicitly defines `PreferDualStack` in `.spec.ipFamilyPolicy`. Kubernetes will assign both IPv4 and IPv6 addresses (as this cluster has dual-stack enabled) and select the `.spec.ClusterIP` from the list of `.spec.ClusterIPs` based on the address family of the first element in the `.spec.ipFamilies` array. + +{{< codenew file="service/networking/dual-stack-preferred-svc.yaml" >}} + +{{< note >}} +The `kubectl get svc` command will only show the primary IP in the `CLUSTER-IP` field. + +```shell +kubectl get svc -l app=MyApp + +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +my-service ClusterIP 10.0.216.242 80/TCP 5s +``` +{{< /note >}} + +Validate that the Service gets cluster IPs from the IPv4 and IPv6 address blocks using `kubectl describe`. You may then validate access to the service via the IPs and ports. + +```shell +kubectl describe svc -l app=MyApp +``` + +``` +Name: my-service +Namespace: default +Labels: app=MyApp +Annotations: +Selector: app=MyApp +Type: ClusterIP +IP Family Policy: PreferDualStack +IP Families: IPv4,IPv6 +IP: 10.0.216.242 +IPs: 10.0.216.242,fd00::af55 +Port: 80/TCP +TargetPort: 9376/TCP +Endpoints: +Session Affinity: None +Events: +``` + +### Create a dual-stack load balanced Service + +If the cloud provider supports the provisioning of IPv6 enabled external load balancers, create the following Service with `PreferDualStack` in `.spec.ipFamilyPolicy`, `IPv6` as the first element of the `.spec.ipFamilies` array and the `type` field set to `LoadBalancer`. + +{{< codenew file="service/networking/dual-stack-prefer-ipv6-lb-svc.yaml" >}} + +Check the Service: + +```shell +kubectl get svc -l app=MyApp +``` + +Validate that the Service receives a `CLUSTER-IP` address from the IPv6 address block along with an `EXTERNAL-IP`. You may then validate access to the service via the IP and port. + +```shell +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +my-service LoadBalancer fd00::7ebc 2603:1030:805::5 80:30790/TCP 35s +``` + + From 074cc20ce3fbab51aef59f2de6bb853e4ac90651 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Tue, 27 Apr 2021 11:17:35 +0000 Subject: [PATCH 2/5] Update example YAML files --- .../networking/dual-stack-default-svc.yaml | 3 ++- .../networking/dual-stack-ipfamilies-ipv6.yaml | 14 ++++++++++++++ .../dual-stack-prefer-ipv6-lb-svc.yaml | 16 ++++++++++++++++ .../dual-stack-preferred-ipfamilies-svc.yaml | 16 ++++++++++++++++ .../networking/dual-stack-preferred-svc.yaml | 13 +++++++++++++ 5 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 content/ja/examples/service/networking/dual-stack-ipfamilies-ipv6.yaml create mode 100644 content/ja/examples/service/networking/dual-stack-prefer-ipv6-lb-svc.yaml create mode 100644 content/ja/examples/service/networking/dual-stack-preferred-ipfamilies-svc.yaml create mode 100644 content/ja/examples/service/networking/dual-stack-preferred-svc.yaml diff --git a/content/ja/examples/service/networking/dual-stack-default-svc.yaml b/content/ja/examples/service/networking/dual-stack-default-svc.yaml index 00ed87ba19..86eadd5478 100644 --- a/content/ja/examples/service/networking/dual-stack-default-svc.yaml +++ b/content/ja/examples/service/networking/dual-stack-default-svc.yaml @@ -2,10 +2,11 @@ apiVersion: v1 kind: Service metadata: name: my-service + labels: + app: MyApp spec: selector: app: MyApp ports: - protocol: TCP port: 80 - targetPort: 9376 \ No newline at end of file diff --git a/content/ja/examples/service/networking/dual-stack-ipfamilies-ipv6.yaml b/content/ja/examples/service/networking/dual-stack-ipfamilies-ipv6.yaml new file mode 100644 index 0000000000..7c7239cae6 --- /dev/null +++ b/content/ja/examples/service/networking/dual-stack-ipfamilies-ipv6.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: my-service + labels: + app: MyApp +spec: + ipFamilies: + - IPv6 + selector: + app: MyApp + ports: + - protocol: TCP + port: 80 diff --git a/content/ja/examples/service/networking/dual-stack-prefer-ipv6-lb-svc.yaml b/content/ja/examples/service/networking/dual-stack-prefer-ipv6-lb-svc.yaml new file mode 100644 index 0000000000..0949a75428 --- /dev/null +++ b/content/ja/examples/service/networking/dual-stack-prefer-ipv6-lb-svc.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: my-service + labels: + app: MyApp +spec: + ipFamilyPolicy: PreferDualStack + ipFamilies: + - IPv6 + type: LoadBalancer + selector: + app: MyApp + ports: + - protocol: TCP + port: 80 diff --git a/content/ja/examples/service/networking/dual-stack-preferred-ipfamilies-svc.yaml b/content/ja/examples/service/networking/dual-stack-preferred-ipfamilies-svc.yaml new file mode 100644 index 0000000000..c31acfec58 --- /dev/null +++ b/content/ja/examples/service/networking/dual-stack-preferred-ipfamilies-svc.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: my-service + labels: + app: MyApp +spec: + ipFamilyPolicy: PreferDualStack + ipFamilies: + - IPv6 + - IPv4 + selector: + app: MyApp + ports: + - protocol: TCP + port: 80 diff --git a/content/ja/examples/service/networking/dual-stack-preferred-svc.yaml b/content/ja/examples/service/networking/dual-stack-preferred-svc.yaml new file mode 100644 index 0000000000..8fb5bfa3d3 --- /dev/null +++ b/content/ja/examples/service/networking/dual-stack-preferred-svc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: my-service + labels: + app: MyApp +spec: + ipFamilyPolicy: PreferDualStack + selector: + app: MyApp + ports: + - protocol: TCP + port: 80 From 553e907708fb02d6102e4d61ef4b1b8f7506071e Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Tue, 27 Apr 2021 11:17:35 +0000 Subject: [PATCH 3/5] Translate _index.md --- content/ja/docs/tasks/network/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/ja/docs/tasks/network/_index.md b/content/ja/docs/tasks/network/_index.md index 0dad8191a0..1d5796f7b7 100755 --- a/content/ja/docs/tasks/network/_index.md +++ b/content/ja/docs/tasks/network/_index.md @@ -1,6 +1,6 @@ --- -title: "Networking" -description: Learn how to configure networking for your cluster. +title: "ネットワーク" +description: クラスターのネットワークの設定方法を学びます。 weight: 160 --- From 68033869bf33f42a304d61fd946d84332046ba5e Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Tue, 27 Apr 2021 11:17:35 +0000 Subject: [PATCH 4/5] Translate tasks/network/validate-dual-stack into japanese --- .../docs/tasks/network/validate-dual-stack.md | 65 +++++++++---------- 1 file changed, 30 insertions(+), 35 deletions(-) diff --git a/content/ja/docs/tasks/network/validate-dual-stack.md b/content/ja/docs/tasks/network/validate-dual-stack.md index bc90dea4ea..ef8aaadf01 100644 --- a/content/ja/docs/tasks/network/validate-dual-stack.md +++ b/content/ja/docs/tasks/network/validate-dual-stack.md @@ -1,23 +1,19 @@ --- -reviewers: -- lachie83 -- khenidak -- bridgetkromhout min-kubernetes-server-version: v1.20 -title: Validate IPv4/IPv6 dual-stack +title: IPv4/IPv6デュアルスタックの検証 content_type: task --- -This document shares how to validate IPv4/IPv6 dual-stack enabled Kubernetes clusters. +このドキュメントでは、IPv4/IPv6デュアルスタックが有効化されたKubernetesクラスターを検証する方法について共有します。 ## {{% heading "prerequisites" %}} -* Provider support for dual-stack networking (Cloud provider or otherwise must be able to provide Kubernetes nodes with routable IPv4/IPv6 network interfaces) -* A [network plugin](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) that supports dual-stack (such as Kubenet or Calico) -* [Dual-stack enabled](/docs/concepts/services-networking/dual-stack/) cluster +* プロバイダーがデュアルスタックのネットワークをサポートしていること (クラウドプロバイダーか、ルーティングできるIPv4/IPv6ネットワークインターフェイスを持つKubernetesノードが提供できること) +* (KubenetやCalicoなど)デュアルスタックをサポートする[ネットワークプラグイン](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) +* [デュアルスタックを有効化](/ja/docs/concepts/services-networking/dual-stack/)したクラスター {{< version-check >}} @@ -25,11 +21,11 @@ This document shares how to validate IPv4/IPv6 dual-stack enabled Kubernetes clu -## Validate addressing +## アドレスの検証 -### Validate node addressing +### ノードアドレスの検証 -Each dual-stack Node should have a single IPv4 block and a single IPv6 block allocated. Validate that IPv4/IPv6 Pod address ranges are configured by running the following command. Replace the sample node name with a valid dual-stack Node from your cluster. In this example, the Node's name is `k8s-linuxpool1-34450317-0`: +各デュアルスタックのノードは、1つのIPv4ブロックと1つのIPv6ブロックを割り当てる必要があります。IPv4/IPv6のPodアドレスの範囲が設定されていることを検証するには、次のコマンドを実行します。例の中のノード名は、自分のクラスターの有効なデュアルスタックのノードの名前に置換してください。この例では、ノードの名前は`k8s-linuxpool1-34450317-0`になっています。 ```shell kubectl get nodes k8s-linuxpool1-34450317-0 -o go-template --template='{{range .spec.podCIDRs}}{{printf "%s\n" .}}{{end}}' @@ -38,9 +34,10 @@ kubectl get nodes k8s-linuxpool1-34450317-0 -o go-template --template='{{range . 10.244.1.0/24 a00:100::/24 ``` -There should be one IPv4 block and one IPv6 block allocated. -Validate that the node has an IPv4 and IPv6 interface detected. Replace node name with a valid node from the cluster. In this example the node name is `k8s-linuxpool1-34450317-0`: +IPv4ブロックとIPv6ブロックがそれぞれ1つずつ割り当てられているはずです。 + +ノードが検出されたIPv4とIPv6のインターフェイスを持っていることを検証します。ノード名は自分のクラスター内の有効なノード名に置換してください。この例では、ノード名は`k8s-linuxpool1-34450317-0`になっています。 ```shell kubectl get nodes k8s-linuxpool1-34450317-0 -o go-template --template='{{range .status.addresses}}{{printf "%s: %s\n" .type .address}}{{end}}' @@ -51,9 +48,9 @@ InternalIP: 10.240.0.5 InternalIP: 2001:1234:5678:9abc::5 ``` -### Validate Pod addressing +### Podアドレスの検証 -Validate that a Pod has an IPv4 and IPv6 address assigned. Replace the Pod name with a valid Pod in your cluster. In this example the Pod name is `pod01`: +PodにIPv4とIPv6のアドレスが割り当てられていることを検証します。Podの名前は自分のクラスター内の有効なPodの名前と置換してください。この例では、Podの名前は`pod01`になっています。 ```shell kubectl get pods pod01 -o go-template --template='{{range .status.podIPs}}{{printf "%s\n" .ip}}{{end}}' @@ -63,7 +60,7 @@ kubectl get pods pod01 -o go-template --template='{{range .status.podIPs}}{{prin a00:100::4 ``` -You can also validate Pod IPs using the Downward API via the `status.podIPs` fieldPath. The following snippet demonstrates how you can expose the Pod IPs via an environment variable called `MY_POD_IPS` within a container. +Downward APIを使用して、`status.podIPs`のfieldPath経由でPod IPを検証することもできます。次のスニペットは、Pod IPを`MY_POD_IPS`という名前の環境変数経由でコンテナ内に公開する方法を示しています。 ``` env: @@ -73,7 +70,7 @@ You can also validate Pod IPs using the Downward API via the `status.podIPs` fie fieldPath: status.podIPs ``` -The following command prints the value of the `MY_POD_IPS` environment variable from within a container. The value is a comma separated list that corresponds to the Pod's IPv4 and IPv6 addresses. +次のコマンドを実行すると、`MY_POD_IPS`環境変数の値をコンテナ内から表示できます。値はカンマ区切りのリストであり、PodのIPv4とIPv6のアドレスに対応しています。 ```shell kubectl exec -it pod01 -- set | grep MY_POD_IPS @@ -82,7 +79,7 @@ kubectl exec -it pod01 -- set | grep MY_POD_IPS MY_POD_IPS=10.244.1.4,a00:100::4 ``` -The Pod's IP addresses will also be written to `/etc/hosts` within a container. The following command executes a cat on `/etc/hosts` on a dual stack Pod. From the output you can verify both the IPv4 and IPv6 IP address for the Pod. +PodのIPアドレスは、コンテナ内の`/etc/hosts`にも書き込まれます。次のコマンドは、デュアルスタックのPod上で`/etc/hosts`に対してcatコマンドを実行します。出力を見ると、Pod用のIPv4およびIPv6のIPアドレスの両方が確認できます。 ```shell kubectl exec -it pod01 -- cat /etc/hosts @@ -99,19 +96,19 @@ fe00::2 ip6-allrouters a00:100::4 pod01 ``` -## Validate Services +## Serviceの検証 -Create the following Service that does not explicitly define `.spec.ipFamilyPolicy`. Kubernetes will assign a cluster IP for the Service from the first configured `service-cluster-ip-range` and set the `.spec.ipFamilyPolicy` to `SingleStack`. +`.spec.isFamilyPolicy`を明示的に定義していない、以下のようなServiceを作成してみます。Kubernetesは最初に設定した`service-cluster-ip-range`の範囲からServiceにcluster IPを割り当てて、`.spec.ipFamilyPolicy`を`SingleStack`に設定します。 {{< codenew file="service/networking/dual-stack-default-svc.yaml" >}} -Use `kubectl` to view the YAML for the Service. +`kubectl`を使ってServiceのYAMLを表示します。 ```shell kubectl get svc my-service -o yaml ``` -The Service has `.spec.ipFamilyPolicy` set to `SingleStack` and `.spec.clusterIP` set to an IPv4 address from the first configured range set via `--service-cluster-ip-range` flag on kube-controller-manager. +Serviceの`.spec.ipFamilyPolicy`は`SingleStack`に設定され、`.spec.clusterIP`にはkube-controller-manager上の`--service-cluster-ip-range`フラグで最初に設定した範囲から1つのIPv4アドレスが設定されているのがわかります。 ```yaml apiVersion: v1 @@ -138,17 +135,17 @@ status: loadBalancer: {} ``` -Create the following Service that explicitly defines `IPv6` as the first array element in `.spec.ipFamilies`. Kubernetes will assign a cluster IP for the Service from the IPv6 range configured `service-cluster-ip-range` and set the `.spec.ipFamilyPolicy` to `SingleStack`. +`.spec.ipFamilies`内の配列の1番目の要素に`IPv6`を明示的に指定した、次のようなServiceを作成してみます。Kubernetesは`service-cluster-ip-range`で設定したIPv6の範囲からcluster IPを割り当てて、`.spec.ipFamilyPolicy`を`SingleStack`に設定します。 {{< codenew file="service/networking/dual-stack-ipfamilies-ipv6.yaml" >}} -Use `kubectl` to view the YAML for the Service. +`kubectl`を使ってServiceのYAMLを表示します。 ```shell kubectl get svc my-service -o yaml ``` -The Service has `.spec.ipFamilyPolicy` set to `SingleStack` and `.spec.clusterIP` set to an IPv6 address from the IPv6 range set via `--service-cluster-ip-range` flag on kube-controller-manager. +Serviceの`.spec.ipFamilyPolicy`は`SingleStack`に設定され、`.spec.clusterIP`には、kube-controller-manager上の`--service-cluster-ip-range`フラグで指定された最初の設定範囲から1つのIPv6アドレスが設定されているのがわかります。 ```yaml apiVersion: v1 @@ -176,12 +173,12 @@ status: loadBalancer: {} ``` -Create the following Service that explicitly defines `PreferDualStack` in `.spec.ipFamilyPolicy`. Kubernetes will assign both IPv4 and IPv6 addresses (as this cluster has dual-stack enabled) and select the `.spec.ClusterIP` from the list of `.spec.ClusterIPs` based on the address family of the first element in the `.spec.ipFamilies` array. +`.spec.ipFamiliePolicy`に`PreferDualStack`を明示的に指定した、次のようなServiceを作成してみます。Kubernetesは(クラスターでデュアルスタックを有効化しているため)IPv4およびIPv6のアドレスの両方を割り当て、`.spec.ClusterIPs`のリストから、`.spec.ipFamilies`配列の最初の要素のアドレスファミリーに基づいた`.spec.ClusterIP`を設定します。 {{< codenew file="service/networking/dual-stack-preferred-svc.yaml" >}} {{< note >}} -The `kubectl get svc` command will only show the primary IP in the `CLUSTER-IP` field. +`kubectl get svc`コマンドは、`CLUSTER-IP`フィールドにプライマリーのIPだけしか表示しません。 ```shell kubectl get svc -l app=MyApp @@ -191,7 +188,7 @@ my-service ClusterIP 10.0.216.242 80/TCP 5s ``` {{< /note >}} -Validate that the Service gets cluster IPs from the IPv4 and IPv6 address blocks using `kubectl describe`. You may then validate access to the service via the IPs and ports. +`kubectl describe`を使用して、ServiceがIPv4およびIPv6アドレスのブロックからcluster IPを割り当てられていることを検証します。その後、ServiceにIPアドレスとポートを使用してアクセスできることを検証することもできます。 ```shell kubectl describe svc -l app=MyApp @@ -215,23 +212,21 @@ Session Affinity: None Events: ``` -### Create a dual-stack load balanced Service +### デュアルスタックのLoadBalancer Serviceを作成する -If the cloud provider supports the provisioning of IPv6 enabled external load balancers, create the following Service with `PreferDualStack` in `.spec.ipFamilyPolicy`, `IPv6` as the first element of the `.spec.ipFamilies` array and the `type` field set to `LoadBalancer`. +クラウドプロバイダーがIPv6を有効化した外部ロードバランサーのプロビジョニングをサポートする場合、`.spec.ipFamilyPolicy`に`PreferDualStack`を指定し、`.spec.ipFamilies`の最初の要素を`IPv6`にして、`type`フィールドに`LoadBalancer`を指定したServiceを作成できます。 {{< codenew file="service/networking/dual-stack-prefer-ipv6-lb-svc.yaml" >}} -Check the Service: +Serviceを確認します。 ```shell kubectl get svc -l app=MyApp ``` -Validate that the Service receives a `CLUSTER-IP` address from the IPv6 address block along with an `EXTERNAL-IP`. You may then validate access to the service via the IP and port. +ServiceがIPv6アドレスブロックから`CLUSTER-IP`のアドレスと`EXTERNAL-IP`を割り当てられていることを検証します。その後、IPとポートを用いたServiceへのアクセスを検証することもできます。 ```shell NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-service LoadBalancer fd00::7ebc 2603:1030:805::5 80:30790/TCP 35s ``` - - From 66d856101ec4f5b3f37cb7660a917ac6e0c7eaf3 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Mon, 31 May 2021 19:38:42 +0900 Subject: [PATCH 5/5] Update content/ja/docs/tasks/network/validate-dual-stack.md Co-authored-by: bells17 --- content/ja/docs/tasks/network/validate-dual-stack.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ja/docs/tasks/network/validate-dual-stack.md b/content/ja/docs/tasks/network/validate-dual-stack.md index ef8aaadf01..9ab51d8701 100644 --- a/content/ja/docs/tasks/network/validate-dual-stack.md +++ b/content/ja/docs/tasks/network/validate-dual-stack.md @@ -98,7 +98,7 @@ a00:100::4 pod01 ## Serviceの検証 -`.spec.isFamilyPolicy`を明示的に定義していない、以下のようなServiceを作成してみます。Kubernetesは最初に設定した`service-cluster-ip-range`の範囲からServiceにcluster IPを割り当てて、`.spec.ipFamilyPolicy`を`SingleStack`に設定します。 +`.spec.isFamilyPolicy`を明示的に定義していない、以下のようなServiceを作成してみます。Kubernetesは最初に設定した`service-cluster-ip-range`の範囲からServiceにcluster IPを割り当てて、`.spec.ipFamilyPolicy`を`SingleStack`に設定します。 {{< codenew file="service/networking/dual-stack-default-svc.yaml" >}}