Rancher Kubernetes Engine (RKE)

Big picture

Install Calico as the required CNI for networking and/or network policy on Rancher-deployed clusters.

Concepts

Calico supports the Calico CNI with Calico network policy:

The geeky details of what you get:

PolicyIPAMCNIOverlayRoutingDatastore

Before you begin

Required

How to

Install Calico

  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

    Rancher Kubernetes Engine (RKE) - 图1note

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

  2. Install Calico by creating the necessary custom resource. For more information on configuration options available in this manifest, see the installation reference.

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

    Rancher Kubernetes Engine (RKE) - 图2note

    Before creating this manifest, read its contents and make sure its settings are correct for your environment. For example, you may need to change the default IP pool CIDR to match your pod network CIDR. Rancher uses 10.42.0.0/16 by default.

    Rancher Kubernetes Engine (RKE) - 图3note

    If you are installing Calico on Windows nodes in this cluster, please see the Calico for Windows for RKE installation instructions.

  3. Confirm that all of the pods are running with the following command.

    1. watch kubectl get pods -n calico-system

    Wait until each pod has the STATUS of Running.

Congratulations! You now have an RKE cluster running Calico

Next steps

Required

Recommended tutorials