instruction: Create a Dockerfile for cluster
output: ```dockerfile
  from within 2000::/3, using a range that is assigned to the operator.
  You don't have to route the cluster's IP address ranges to the public internet.
  The size of the IP address allocations should be suitable for the number of Pods and
  Services that you are planning to run.
  Note:If you are upgrading an existing cluster with the kubeadm upgrade command,
  kubeadm does not support making modifications to the pod IP address range
  (“cluster CIDR”) nor to the cluster's Service address range (“Service CIDR”).
  Create a dual-stack cluster
  To create a dual-stack cluster with kubeadm init you can pass command line arguments
  similar to the following example:
  # These address ranges are examples
  kubeadm init --pod-network-cidr=10.244.0.0/16,2001:db8:42:0::/56 --service-cidr=10.96.0.0/16,2001:db8:42:1::/112
  To make things clearer, here is an example kubeadm
  configuration file
  kubeadm-config.yaml for the primary dual-stack control plane node.
  ---
  apiVersion: kubeadm.k8s.io/v1beta3
  kind: ClusterConfiguration
  networking:
   podSubnet: 10.244.0.0/16,2001:db8:42:0::/56
   serviceSubnet: 10.96.0.0/16,2001:db8:42:1::/112
  ---
  apiVersion: kubeadm.k8s.io/v1beta3
  kind: InitConfiguration
  localAPIEndpoint:
   advertiseAddress: "10.100.0.1"
   bindPort: 6443
  nodeRegistration:
   kubeletExtraArgs:
   node-ip: 10.100.0.2,fd00:1:2:3::2
  advertiseAddress in InitConfiguration specifies the IP address that the API Server
  will advertise it is listening on. The value of advertiseAddress equals the
  --apiserver-advertise-address flag of kubeadm init.
  Run kubeadm to initiate the dual-stack control plane node:
  kubeadm init --config=kubeadm-config.yaml
  The kube-controller-manager flags --node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6
  are set with default values. See configure IPv4/IPv6 dual stack.
  Note:The --apiserver-advertise-address flag does not support dual-stack.
  Join a node to dual-stack cluster
  Before joining a node, make sure that the node has IPv6 routable network interface and allows IPv6 forwarding.
  Here is an example kubeadm configuration file
  kubeadm-config.yaml for joining a worker node to the cluster.
  apiVersion: kubeadm.k8s.io/v1beta3
  kind: JoinConfiguration
  discovery:
   bootstrapToken:
   apiServerEndpoint: 10.100.0.1:6443
   token: "clvldh.vjjwg16ucnhp94qr"
   caCertHashes:
   - "sha256:a4863cde706cfc580a439f842cc65d5ef112b7b2be31628513a9881cf0d9fe0e"
   # change auth info above to match the actual token and CA certificate hash for your cluster
  nodeRegistration:
   kubeletExtraArgs:
   node-ip: 10.100.0.3,fd00:1:2:3::3
  Also, here is an example kubeadm configuration file
  kubeadm-config.yaml for joining another control plane node to the cluster.
  apiVersion: kubeadm.k8s.io/v1beta3
  kind: JoinConfiguration
  controlPlane:
   localAPIEndpoint:
   advertiseAddress: "10.100.0.2"
   bindPort: 6443
  discovery:
   bootstrapToken:
   apiServerEndpoint: 10.100.0.1:6443
   token: "clvldh.vjjwg16ucnhp94qr"
   caCertHashes:
   - "sha256:a4863cde706cfc580a439f842cc65d5ef112b7b2be31628513a9881cf0d9fe0e"
   # change auth info above to match the actual token and CA certificate hash for your cluster
  nodeRegistration:
   kubeletExtraArgs:
   node-ip: 10.100.0.4,fd00:1:2:3::4
  advertiseAddress in JoinConfiguration.controlPlane specifies the IP address that the
  API Server will advertise it is listening on. The value of advertiseAddress equals
  the --apiserver-advertise-address flag of kubeadm join.
  kubeadm join --config=kubeadm-config.yaml
  Create a single-stack cluster
  Note:Dual-stack support doesn't mean that you need to use dual-stack addressing.
  You can deploy a single-stack cluster that has the dual-stack networking feature enabled.
  To make things more clear, here is an example kubeadm
  configuration file
  kubeadm-config.yaml for the single-stack control plane node.
  apiVersion: kubeadm.k8s.io/v1beta3
  kind: ClusterConfiguration
  networking:
   podSubnet: 10.244.0.0/16
   serviceSubnet: 10.96.0.0/16
  What's next
  
  Validate IPv4/IPv6 dual-stack networking
  Read about Dual-stack cluster networking
  Learn more about the kubeadm configuration format
  
  Feedback
  Was this page helpful?
  Yes
  No
  
   Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes, ask it on
  
   Stack Overflow.
   Open an issue in the GitHub Repository if you want to
  
   report a problem
   or
  
   suggest an improvement.
  
   Last modified July 08, 2023 at 6:23 PM PST: tweak line wrappings in kops and kubespray (df1e0b0d97)
  
    Create child page
   Create an issue
   Print entire section
  
  Before you begin
  
  Create a dual-stack cluster
  Join a node to dual-stack cluster
  Create a single-stack cluster
  
  What's next
  
  Documentation
  Blog
  Training
  Partners
  Community
  Case Studies
  
  © 2025 The Kubernetes Authors | Documentation Distributed under CC BY 4.0
  
  ICP license: 京ICP备17074266号-3
  ```