@@ -32,7 +32,7 @@ kubectl get nodes k8s-linuxpool1-34450317-0 -o go-template --template='{{range .
32
32
```
33
33
```
34
34
10.244.1.0/24
35
- a00:100 ::/24
35
+ 2001:db8 ::/64
36
36
```
37
37
38
38
IPv4ブロックとIPv6ブロックがそれぞれ1つずつ割り当てられているはずです。
@@ -44,8 +44,8 @@ kubectl get nodes k8s-linuxpool1-34450317-0 -o go-template --template='{{range .
44
44
```
45
45
```
46
46
Hostname: k8s-linuxpool1-34450317-0
47
- InternalIP: 10.240 .0.5
48
- InternalIP: 2001:1234:5678:9abc ::5
47
+ InternalIP: 10.0 .0.5
48
+ InternalIP: 2001:db8:10 ::5
49
49
```
50
50
51
51
### Podアドレスの検証
@@ -57,7 +57,7 @@ kubectl get pods pod01 -o go-template --template='{{range .status.podIPs}}{{prin
57
57
```
58
58
```
59
59
10.244.1.4
60
- a00:100 ::4
60
+ 2001:db8 ::4
61
61
```
62
62
63
63
Downward APIを使用して、` status.podIPs ` のfieldPath経由でPod IPを検証することもできます。次のスニペットは、Pod IPを` MY_POD_IPS ` という名前の環境変数経由でコンテナ内に公開する方法を示しています。
@@ -76,7 +76,7 @@ Downward APIを使用して、`status.podIPs`のfieldPath経由でPod IPを検
76
76
kubectl exec -it pod01 -- set | grep MY_POD_IPS
77
77
```
78
78
```
79
- MY_POD_IPS=10.244.1.4,a00:100 ::4
79
+ MY_POD_IPS=10.244.1.4,2001:db8 ::4
80
80
```
81
81
82
82
PodのIPアドレスは、コンテナ内の` /etc/hosts ` にも書き込まれます。次のコマンドは、デュアルスタックのPod上で` /etc/hosts ` に対してcatコマンドを実行します。出力を見ると、Pod用のIPv4およびIPv6のIPアドレスの両方が確認できます。
@@ -93,7 +93,7 @@ fe00::0 ip6-mcastprefix
93
93
fe00::1 ip6-allnodes
94
94
fe00::2 ip6-allrouters
95
95
10.244.1.4 pod01
96
- a00:100 ::4 pod01
96
+ 2001:db8 ::4 pod01
97
97
```
98
98
99
99
## Serviceの検証
@@ -155,9 +155,9 @@ metadata:
155
155
app: MyApp
156
156
name: my-service
157
157
spec:
158
- clusterIP: fd00::5118
158
+ clusterIP: 2001:db8: fd00::5118
159
159
clusterIPs:
160
- - fd00::5118
160
+ - 2001:db8: fd00::5118
161
161
ipFamilies:
162
162
- IPv6
163
163
ipFamilyPolicy: SingleStack
@@ -204,7 +204,7 @@ Type: ClusterIP
204
204
IP Family Policy: PreferDualStack
205
205
IP Families: IPv4,IPv6
206
206
IP: 10.0.216.242
207
- IPs: 10.0.216.242,fd00::af55
207
+ 10.0.216.242,2001:db8: fd00::af55
208
208
Port: <unset > 80/TCP
209
209
TargetPort: 9376/TCP
210
210
Endpoints: <none >
@@ -227,6 +227,6 @@ kubectl get svc -l app=MyApp
227
227
ServiceがIPv6アドレスブロックから` CLUSTER-IP ` のアドレスと` EXTERNAL-IP ` を割り当てられていることを検証します。その後、IPとポートを用いたServiceへのアクセスを検証することもできます。
228
228
229
229
``` shell
230
- NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
231
- my-service LoadBalancer fd00::7ebc 2603:1030:805::5 80:30790/TCP 35s
230
+ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
231
+ my-service LoadBalancer 2001:db8: fd00::7ebc 2603:1030:805::5 80:30790/TCP 35s
232
232
```
0 commit comments