Merge pull request #36683 from aojea/ipv6_ietf

use IPv6 Address Prefix Reserved for Documentation
pull/36694/head
Kubernetes Prow Robot 2022-09-08 04:00:06 -07:00 committed by GitHub
commit c9c77d2bc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 14 deletions

View File

@ -308,7 +308,7 @@ kubectl exec -it dns-example -- cat /etc/resolv.conf
```
The output is similar to this:
```
nameserver fd00:79:30::a
nameserver 2001:db8:30::a
search default.svc.cluster-domain.example svc.cluster-domain.example cluster-domain.example
options ndots:5
```

View File

@ -122,7 +122,7 @@ on the provisioned node, specify the `--cri-socket` argument to `kubeadm`. See
with the default gateway to set the advertise address for this particular control-plane node's API server.
To use a different network interface, specify the `--apiserver-advertise-address=<ip-address>` argument
to `kubeadm init`. To deploy an IPv6 Kubernetes cluster using IPv6 addressing, you
must specify an IPv6 address, for example `--apiserver-advertise-address=fd00::101`
must specify an IPv6 address, for example `--apiserver-advertise-address=2001:db8::101`
To initialize the control-plane node run:
@ -377,7 +377,7 @@ The output is similar to:
```
{{< note >}}
To specify an IPv6 tuple for `<control-plane-host>:<control-plane-port>`, IPv6 address must be enclosed in square brackets, for example: `[fd00::101]:2073`.
To specify an IPv6 tuple for `<control-plane-host>:<control-plane-port>`, IPv6 address must be enclosed in square brackets, for example: `[2001:db8::101]:2073`.
{{< /note >}}
The output should look something like:

View File

@ -39,7 +39,7 @@ kubectl get nodes k8s-linuxpool1-34450317-0 -o go-template --template='{{range .
```
```
10.244.1.0/24
a00:100::/24
2001:db8::/64
```
There should be one IPv4 block and one IPv6 block allocated.
@ -50,8 +50,8 @@ kubectl get nodes k8s-linuxpool1-34450317-0 -o go-template --template='{{range .
```
```
Hostname: k8s-linuxpool1-34450317-0
InternalIP: 10.240.0.5
InternalIP: 2001:1234:5678:9abc::5
InternalIP: 10.0.0.5
InternalIP: 2001:db8:10::5
```
### Validate Pod addressing
@ -63,7 +63,7 @@ kubectl get pods pod01 -o go-template --template='{{range .status.podIPs}}{{prin
```
```
10.244.1.4
a00:100::4
2001:db8::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.
@ -82,7 +82,7 @@ The following command prints the value of the `MY_POD_IPS` environment variable
kubectl exec -it pod01 -- set | grep MY_POD_IPS
```
```
MY_POD_IPS=10.244.1.4,a00:100::4
MY_POD_IPS=10.244.1.4,2001:db8::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.
@ -99,7 +99,7 @@ fe00::0 ip6-mcastprefix
fe00::1 ip6-allnodes
fe00::2 ip6-allrouters
10.244.1.4 pod01
a00:100::4 pod01
2001:db8::4 pod01
```
## Validate Services
@ -161,9 +161,9 @@ metadata:
app.kubernetes.io/name: MyApp
name: my-service
spec:
clusterIP: fd00::5118
clusterIP: 2001:db8:fd00::5118
clusterIPs:
- fd00::5118
- 2001:db8:fd00::5118
ipFamilies:
- IPv6
ipFamilyPolicy: SingleStack
@ -210,7 +210,7 @@ Type: ClusterIP
IP Family Policy: PreferDualStack
IP Families: IPv4,IPv6
IP: 10.0.216.242
IPs: 10.0.216.242,fd00::af55
IPs: 10.0.216.242,2001:db8:fd00::af55
Port: <unset> 80/TCP
TargetPort: 9376/TCP
Endpoints: <none>
@ -233,8 +233,8 @@ kubectl get svc -l app.kubernetes.io/name=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
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
my-service LoadBalancer 2001:db8:fd00::7ebc 2603:1030:805::5 80:30790/TCP 35s
```