Install Calico for Windows on a Rancher Kubernetes Engine cluster

2 MINUTE READ

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.19, 1.18, or 1.17

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.

    kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml
    
  2. Download the necessary Installation custom resource.

    wget https://docs.projectcalico.org/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

    apiVersion: operator.tigera.io/v1
    kind: Installation
    metadata:
      name: default
    spec:
      # Configures Calico networking.
      calicoNetwork:
        bgp: Disabled
        # Note: The ipPools section cannot be modified post-install.
        ipPools:
        - blockSize: 26
          cidr: 10.42.0.0/16
          encapsulation: VXLAN
          natOutgoing: Enabled
          nodeSelector: all()
    

    BGP

    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.42.0.0/16
          encapsulation: None
          natOutgoing: Enabled
          nodeSelector: all()
    

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

  4. Apply the updated custom resources:

    kubectl create -f custom-resources.yaml
    
  5. Install and configure calicoctl

  6. Configure strict affinity:
    calicoctl ipam configure --strictaffinity=true
    
  7. 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.

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

  8. 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