You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/tasks/network/validate-dual-stack.md
+86-22
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
reviewers:
3
3
- lachie83
4
4
- khenidak
5
+
- bridgetkromhout
5
6
min-kubernetes-server-version: v1.16
6
7
title: Validate IPv4/IPv6 dual-stack
7
8
content_type: task
@@ -97,31 +98,33 @@ a00:100::4 pod01
97
98
98
99
## Validate Services
99
100
100
-
Create the following Service without the `ipFamily` field set. When this field is not set, the Service gets an IP from the first configured range via `--service-cluster-ip-range`flag on the kube-controller-manager.
101
+
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`.
By viewing the YAML for the Service you can observe that the Service has the `ipFamily` field has set to reflect the address family of the first configured range set via `--service-cluster-ip-range` flag on kube-controller-manager.
105
+
By viewing the YAML for the Service, observe that the Service has the `.spec.ipFamilyPolicy` field has set to `SingleStack` and the `.spec.clusterIP` set to an IPv4 address from the first configured range set via `--service-cluster-ip-range` flag on kube-controller-manager.
Create the following Service with the `ipFamily` field set to `IPv6`.
140
+
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`.
Validate that the Service gets a cluster IP address from the IPv6 address block. You may then validate access to the service via the IP and port.
144
+
By viewing the YAML for the Service, observe that the Service has the `.spec.ipFamilyPolicy` field has set to `SingleStack` and the `.spec.clusterIP` set to an IPv6 address from the IPv6 range set via `--service-cluster-ip-range` flag on kube-controller-manager.
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.
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.
182
+
183
+
{{< note >}}
184
+
The `kubectl get svc` command will only show the primary IP in the `CLUSTER-IP` field.
If the cloud provider supports the provisioning of IPv6 enabled external load balancer, create the following Service with both the `ipFamily` field set to `IPv6` and the `type` field set to `LoadBalancer`
214
+
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`.
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.
0 commit comments