Skip to main content
Version: 3.27 (latest)

Configure dual stack or IPv6 only

Big picture

Configure Calico IP address allocation to use dual stack or IPv6 only for workload communications.

Value

Workload communication over IPv6 is increasingly desirable, as well as or instead of IPv4. Calico supports:

  • IPv4 only (default)

    Each workload gets an IPv4 address, and can communicate over IPv4.

  • Dual stack

    Each workload gets an IPv4 and an IPv6 address, and can communicate over IPv4 or IPv6.

  • IPv6 only

    Each workload gets an IPv6 address, and can communicate over IPv6.

Before you begin

Calico requirements

  • Calico IPAM

Kubernetes version requirements

  • For dual stack, 1.16 and later
  • For one IP stack at a time (IPv4 or IPv6), any Kubernetes version

Kubernetes IPv6 host requirements

  • An IPv6 address that is reachable from the other hosts
  • The sysctl setting, net.ipv6.conf.all.forwarding, is set to 1. This ensures both Kubernetes service traffic and Calico traffic is forwarded appropriately.
  • A default IPv6 route

Kubernetes IPv4 host requirements

  • An IPv4 address that is reachable from the other hosts
  • The sysctl setting, net.ipv4.conf.all.forwarding, is set to 1. This ensures both Kubernetes service traffic and Calico traffic is forwarded appropriately.
  • A default IPv4 route

How to

note

The following tasks are only for new clusters.

Enable IPv6 only

To configure an IPv6-only cluster using the operator, edit your default Installation at install time to include a single IPv6 pool, and no IPv4 pools. For example:

apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
name: default
spec:
calicoNetwork:
# Note: The ipPools section cannot be modified post-install.
ipPools:
- blockSize: 122
cidr: 2001::00/64
encapsulation: None
natOutgoing: Enabled
nodeSelector: all()

Enable dual stack

  1. Set up a new cluster following the Kubernetes prerequisites and enablement steps.

To configure dual-stack cluster using the operator, edit your default Installation at install time to include both an IPv4 and IPv6 pool. For example:

apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
name: default
spec:
# Configures Calico networking.
calicoNetwork:
# Note: The ipPools section cannot be modified post-install.
ipPools:
- blockSize: 26
cidr: 10.48.0.0/21
encapsulation: IPIP
natOutgoing: Enabled
nodeSelector: all()
- blockSize: 122
cidr: 2001::00/64
encapsulation: None
natOutgoing: Enabled
nodeSelector: all()

Additional resources