使用eksctl创建新的IPv6, 里面指定了使用已有VPC:
cat >ipv6-cluster2.yaml <<EOF
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: ipv6-cluster
region: us-west-2
version: "1.28"
vpc:
subnets:
public:
us-west-2a:
id: subnet-3221874a
us-west-2b:
id: subnet-22ff3c68
us-west-2c:
id: subnet-2ab30377
kubernetesNetworkConfig:
ipFamily: IPv6
addons:
- name: vpc-cni
version: latest
- name: coredns
version: latest
- name: kube-proxy
version: latest
iam:
withOIDC: true
managedNodeGroups:
- name: ng-1
instanceType: t3.large
EOF
创建集群:
eksctl create cluster -f ipv6-cluster2.yaml
查看pod上是否具有IPv6地址:
kubectl get pods -n kube-system -o wide
查看service上是否具有IPv6地址:
kubectl get services -n kube-system -o wide