Install Calico for Windows on a Rancher Kubernetes Engine cluster

Big picture

Install Calico for Windows on a Rancher Kubernetes Engine (RKE) cluster.

Value

Run Linux and Windows workloads on a RKE cluster with Calico.

Before you begin

Supported

  • RKE Kubernetes 1.20, 1.19, or 1.18

Supported networking

  • BGP with no encapsulation
  • VXLAN

Required

How to

The following steps will outline the installation of Calico networking on the RKE cluster, then the installation of Calico for Windows on the Windows nodes.

  1. Install the Tigera Calico operator and custom resource definitions.

    1. kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.4/manifests/tigera-operator.yaml

    Install Calico for Windows on a Rancher Kubernetes Engine cluster - 图1note

    Due to the large size of the CRD bundle, kubectl apply might exceed request limits. Instead, use kubectl create or kubectl replace.

  2. Download the necessary Installation custom resource.

    1. wget https://raw.githubusercontent.com/projectcalico/calico/v3.26.4/manifests/custom-resources.yaml
  3. Update the calicoNetwork options, ensuring that the correct pod CIDR is set. (Rancher uses 10.42.0.0/16 by default.) Below are sample installations for VXLAN and BGP networking using the default Rancher pod CIDR:

    VXLAN

    1. apiVersion: operator.tigera.io/v1
    2. kind: Installation
    3. metadata:
    4. name: default
    5. spec:
    6. # Configures Calico networking.
    7. calicoNetwork:
    8. bgp: Disabled
    9. # Note: The ipPools section cannot be modified post-install.
    10. ipPools:
    11. - blockSize: 26
    12. cidr: 10.42.0.0/16
    13. encapsulation: VXLAN
    14. natOutgoing: Enabled
    15. nodeSelector: all()

    BGP

    1. apiVersion: operator.tigera.io/v1
    2. kind: Installation
    3. metadata:
    4. name: default
    5. spec:
    6. # Configures Calico networking.
    7. calicoNetwork:
    8. # Note: The ipPools section cannot be modified post-install.
    9. ipPools:
    10. - blockSize: 26
    11. cidr: 10.42.0.0/16
    12. encapsulation: None
    13. natOutgoing: Enabled
    14. nodeSelector: all()

    Install Calico for Windows on a Rancher Kubernetes Engine cluster - 图2note

    For more information on configuration options available in this manifest, see the installation reference.

  4. Apply the updated custom resources:

    1. kubectl create -f custom-resources.yaml
  5. Configure strict affinity:

    1. kubectl patch ipamconfigurations default --type merge --patch='{"spec": {"strictAffinity": true}}'
  6. Finally, follow the Calico for Windows quickstart guide for Kubernetes For VXLAN clusters, follow the instructions under the “Kubernetes VXLAN” tab. For BGP clusters, follow the instructions under the “Kubernetes BGP” tab.

    Install Calico for Windows on a Rancher Kubernetes Engine cluster - 图3note

    For Rancher default values for service CIDR and DNS cluster IP, see the Rancher kube-api service options.

  7. Check the status of the nodes with kubectl get nodes. If you see that the Windows node has the status Ready, then you have a Calico for Windows on RKE cluster ready for Linux and Windows workloads!

Next steps