Skip to main content
Calico Enterprise 3.23 (latest) documentation

vSphere Kubernetes Service (VKS)

Big picture​

Install Calico Enterprise as a Supervisor Service on vSphere Kubernetes Service (VKS), and deploy it to guest clusters.

Before you begin​

This guide requires:

  • Versions: VKS 3.8 or later, and vCenter 9.1.1 or later.
  • VM images: Ubuntu or Photon OVA images registered for a supported Tanzu Kubernetes release (TKR), with the TKR in a healthy state. For Windows node pools, you also need Windows Server OVA images.
  • vSphere resources: Enough capacity to provision guest clusters with at least:
    • 1 control plane node
    • 3 Linux worker nodes
  • OCI registry: An OCI-compliant registry configured in vSphere to store package manifests and container images.
  • Tigera registry credentials to pull from the Tigera container registry. Contact the Tigera team to get them.

Networking​

ConfigurationDataplaneEncapsulationBGP
Linux only (default)IPTablesIPIPEnabled

How to​

Setting up Calico Enterprise on VKS has two main phases:

  1. Part 1: Set up Calico Enterprise as a Supervisor Service in the vSphere Client. You do this once.
  2. Part 2: Deploy Calico Enterprise to a guest cluster.

For air-gapped environments, also follow the steps in Air-gapped environments.

Part 1: Set up the Supervisor Service (one-time cluster admin setup)​

  1. In the vSphere Client, on the Container Registries page, add the Tigera container registry so that the Supervisor can pull Calico Enterprise images:

    • Registry host URL: quay.io
    • Username and Password: the Tigera registry credentials

    For air-gapped installs, add the private registry that holds the Calico Enterprise images instead. See Copy the images to the private registry.

  2. In the vSphere Client, on the Supervisor Management page, create a new Supervisor Service, or add a new version to an existing one.

  3. Upload the following Package and PackageMetadata resources, and complete the setup workflow:

    ---
    apiVersion: data.packaging.carvel.dev/v1alpha1
    kind: Package
    metadata:
    name: calico-enterprise-svs.tigera.io.3.23.4
    spec:
    refName: calico-enterprise-svs.tigera.io
    version: 3.23.4
    template:
    spec:
    fetch:
    - imgpkgBundle:
    image: quay.io/tigera/calico-enterprise-svs:v3.23.4 # For air-gapped installs, change this to the private registry
    template:
    - ytt:
    paths:
    - service
    - kapp
    - kbld:
    paths:
    - "-"
    - .imgpkg/images.yml
    - kbld/
    deploy:
    - kapp: {}
    ---
    apiVersion: data.packaging.carvel.dev/v1alpha1
    kind: PackageMetadata
    metadata:
    name: calico-enterprise-svs.tigera.io
    spec:
    displayName: "Calico Enterprise SVS"
    shortDescription: "Manages Calico Enterprise Addon Repository and Installation"
  4. Register the Supervisor Service. In the service YAML configuration, set registryName to the name you gave the Tigera container registry in step 1:

    registryName: <registered-registry-name>

    For air-gapped installs, also set chartRepository to the private registry path that holds the Calico Enterprise Helm chart. See Copy the add-on to the private registry.

    chartRepository: oci://<private-registry>/<path>

Part 2: Deploy a guest cluster with Calico Enterprise​

Guest cluster prerequisites​

  • Tigera license file. Contact the Tigera team to get one.
  • Dynamic PV provisioning through a StorageClass. Elasticsearch needs it for storage.

Step 1 (optional): Apply the AddonConfig​

You need an AddonConfig only to change the default Calico Enterprise configuration, for example to create a cluster with Windows nodes. A Linux-only cluster that uses the defaults doesn't need one.

The following example AddonConfig enables the Windows dataplane and disables policy recommendation. Before you apply it, update the following fields:

  • metadata.name and metadata.namespace. The name must use the format <cluster-name>-calico-enterprise. If it doesn't, the add-on framework ignores your AddonConfig and creates one with default values instead.
  • For air-gapped installs, spec.values.helmValues.installation.registry. Set it to the private registry that holds the Calico Enterprise images. See Copy the images to the private registry.
addon-config.yaml
apiVersion: addons.kubernetes.vmware.com/v1alpha1
kind: AddonConfig
metadata:
name: <cluster-name>-calico-enterprise
namespace: <cluster-namespace>
spec:
values:
helmValues:
# You can set any option from tigera-helm-charts/tigera-operator/values.yaml here.
# Options you don't set use the defaults from the AddonConfigDefinition schema.
# The following fields are examples.
installation:
calicoWindowsDataplane:
enabled: true
policyRecommendation:
enabled: false
kubectl apply -f ./addon-config.yaml
note

All Calico Enterprise features (logCollector, logStorage, manager, monitor, and policyRecommendation) are optional. Only apiServer is required. To turn off a feature, set its enabled field to false.

Step 2 (optional): Apply a custom AddonInstall resource​

You need a custom AddonInstall resource only to control which clusters get upgraded. In spec.clusters.selector.matchLabels, set the labels that a cluster must have. Then add those labels to the Cluster resources that you want to upgrade.

addon-install.yaml
apiVersion: addons.kubernetes.vmware.com/v1alpha1
kind: AddonInstall
metadata:
labels:
addon.kubernetes.vmware.com/addon-name: calico-enterprise
addon.kubernetes.vmware.com/addon-namespace: vmware-system-vks-public
addons.kubernetes.vmware.com/category: cni
name: <addon-install-name>
namespace: <cluster-namespace>
spec:
addonRef:
name: calico-enterprise
namespace: vmware-system-vks-public
clusters:
- selector:
matchLabels:
<addon-install-label-key>: <addon-install-label-value> # For example, cluster-group: calico-group-1
constraints:
expression: cluster.cniRefName() = "calico-enterprise" && cluster.kubeProxyConfiguration().enabled == true
releaseFilter:
ref:
name: calico-enterprise.tigera.io.3.23.4
stopMatchingBehavior: Retain
kubectl apply -f ./addon-install.yaml

Step 3: Apply the Cluster resource​

The following example creates a cluster with Linux and Windows node pools. For a Linux-only cluster, remove the Windows node pool (windows-pool).

Before you apply it, update the following fields:

  • metadata.name and metadata.namespace.
  • cniRef in the bootstrapAddons variable, if the Calico Enterprise add-on has a different name or namespace.
  • metadata.labels, if you applied a custom AddonInstall in Step 2. Add the <addon-install-label-key>: <addon-install-label-value> label from the AddonInstall.
  • The node pool configuration, such as the VM class, storage class, and number of replicas, to suit your environment.
cluster.yaml
apiVersion: cluster.x-k8s.io/v1beta2
kind: Cluster
metadata:
name: <cluster-name>
namespace: <cluster-namespace>
spec:
clusterNetwork:
pods: {cidrBlocks: [100.96.0.0/11]}
services: {cidrBlocks: [100.64.0.0/13]} # required for Windows (becomes serviceCIDRs)
serviceDomain: cluster.local
topology:
classRef: {name: builtin-generic-v3.8.0, namespace: vmware-system-vks-public}
version: v1.36.4+vmware.2-vkr.3
controlPlane:
replicas: 1
metadata: &ubuntu
annotations: {run.tanzu.vmware.com/resolve-os-image: "os-name=ubuntu,os-version=24.04"}
workers:
machineDeployments:
- {class: node-pool, name: linux-pool-1, replicas: 3, metadata: *ubuntu,
variables: {overrides: [{name: vmClass, value: best-effort-large}]}}
- {class: node-pool, name: linux-pool-2, replicas: 2, metadata: *ubuntu}
- class: node-pool
name: windows-pool
replicas: 2
metadata:
annotations: {run.tanzu.vmware.com/resolve-os-image: "os-name=windows,os-version=2022"}
variables: {overrides: [{name: vmClass, value: best-effort-xlarge}]}
variables:
- {name: bootstrapAddons, value: {cniRef: {name: calico-enterprise, namespace: vmware-system-vks-public}}}
- {name: vmClass, value: best-effort-xlarge}
- {name: storageClass, value: vsan-esa-default-policy-raid5}
- {name: vsphereOptions, value: {persistentVolumes: {defaultStorageClass: vsan-esa-default-policy-raid5}}}
- {name: kubernetes, value: {certificateRotation: {enabled: true, renewalDaysBeforeExpiry: 90}}}
# Must be cluster-level: the Calico ACD only reads spec.topology.variables.
- {name: osConfiguration, value: {windowsToolsConfig: {excludeNICs: ["cali*"]}}}
- name: node
value:
firewall:
inboundRules:
- {protocol: tcp, fromPort: 179, toPort: 179} # BGP
- {protocol: udp, fromPort: 4789, toPort: 4789} # VXLAN
- {protocol: tcp, fromPort: 5473, toPort: 5473} # Typha
- {protocol: udp, fromPort: 51820, toPort: 51820} # WireGuard
- {protocol: tcp, fromPort: 8444, toPort: 8444} # Linseed
- {protocol: tcp, fromPort: 9090, toPort: 9090} # Prometheus
- {protocol: tcp, fromPort: 9200, toPort: 9200} # Elasticsearch
- {protocol: tcp, fromPort: 9300, toPort: 9300} # Elasticsearch transport
- {protocol: tcp, fromPort: 9443, toPort: 9443} # Manager UI
kubectl apply -f ./cluster.yaml

Step 4: Retrieve the guest cluster kubeconfig​

Copy the guest cluster's kubeconfig from the Supervisor. Run the remaining steps against the guest cluster.

Step 5: Wait for the core components​

Monitor the Tigera status until calico and apiserver show as Available:

kubectl get tigerastatus

All nodes are now in the Ready state.

Step 6 (Windows only): Configure Windows nodes​

Skip this step for Linux-only clusters.

  1. Set strictAffinity to true in the IPAM configuration:

    kubectl patch ipamconfigurations default --type merge -p '{"spec":{"strictAffinity":true}}'

    If the IPAM configuration doesn't exist yet, create it:

    kubectl apply -f - <<EOF
    apiVersion: projectcalico.org/v3
    kind: IPAMConfiguration
    metadata: {name: default}
    spec: {strictAffinity: true}
    EOF
  2. Get the Kubernetes version of the guest cluster:

    kubectl version -o json | jq -r '.serverVersion.gitVersion'

    If the version has a VMware suffix, such as v1.36.4+vmware.2, remove the suffix (v1.36.4). Keep the suffix only if the sigwindowstools/kube-proxy repository has a kube-proxy image for that VMware version.

  3. Install kube-proxy for Windows:

    curl -L https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/hostprocess/calico/kube-proxy/kube-proxy.yml | sed "s/KUBE_PROXY_VERSION/<kubernetes-version>/g" | kubectl apply -f -

    Replace <kubernetes-version> with the version from the previous step.

    In an air-gapped environment, download kube-proxy.yml on a host with internet access, and copy it into the environment. Then run the same sed and kubectl apply commands on the local file.

Step 7: Apply the Tigera license​

kubectl apply -f <path-to-license-file>

Replace <path-to-license-file> with the path to the Tigera license file.

Step 8: Verify the installation​

Wait for all remaining components to become available:

kubectl get tigerastatus
kubectl get pods -A | grep -E 'tigera|calico'

When every component in tigerastatus shows Available, the installation is complete. You can now deploy workloads to test networking.

Air-gapped environments​

An air-gapped environment has no internet access, or very limited access. Clusters in such an environment can't pull the Calico Enterprise add-on or the Calico Enterprise images directly from Tigera's registries. Instead, you copy these artifacts from Tigera's registries to a private registry that the environment can reach.

This involves two tasks:

  1. Copy the add-on to the private registry, so that the Supervisor can install the Calico Enterprise Supervisor Service.
  2. Copy the images to the private registry, so that guest clusters can run Calico Enterprise.

Air-gapped prerequisites​

  • imgpkg, helm, and yq installed locally.
  • Network access to both Tigera's registry and the private registry. If no single host can reach both, you can copy the artifacts through a tarball instead.
  • Credentials to push to the private registry. imgpkg uses your local Docker configuration, or prompts you for credentials.

Copy the add-on to the private registry​

The Calico Enterprise add-on consists of a Helm chart and a Supervisor Service (SVS) bundle. Copy both to the private registry, then point the Supervisor Service at them.

Step 1: Copy the Helm chart​

On a host that can reach quay.io, pull the Calico Enterprise add-on Helm chart and push it to the private registry:

helm pull oci://quay.io/tigera/calico-enterprise --version 3.23.4
helm push calico-enterprise-3.23.4.tgz oci://<private-registry>/<path>

Replace <private-registry>/<path> with the registry and path that will hold the chart. Don't include the chart name (calico-enterprise) in the path. You use the same value for chartRepository when you register the Supervisor Service in Step 5.

Step 2: Copy the SVS bundle to a tarball​

On a host that can reach quay.io, copy the SVS bundle to a tarball:

imgpkg copy --bundle quay.io/tigera/calico-enterprise-svs:v3.23.4 --to-tar calico-enterprise-svs.tar
tip

If one host can reach both registries, you can copy the bundle directly to the private registry and skip Step 3. Replace --to-tar calico-enterprise-svs.tar with --to-repo <private-registry>/calico-enterprise-svs.

Step 3: Push the SVS bundle to the private registry​

On a host that can reach the private registry, push the tarball:

imgpkg copy --tar calico-enterprise-svs.tar --to-repo <private-registry>/calico-enterprise-svs
caution

Use imgpkg to copy the bundle. Don't copy individual images with docker pull and docker push. Re-tagging images can change their manifest digests, and the bundle's images.yml lock file isn't updated to match. kapp-controller then fails to fetch the images, with a manifest unknown error.

Step 4: Update the package to use the private registry​

The Package resource in calico-enterprise-svs.yaml is the only registry reference outside the bundles. Update it to point to the SVS bundle in the private registry:

yq eval '
(select(.kind == "Package") | .spec.template.spec.fetch[0].imgpkgBundle.image)
= "<private-registry>/calico-enterprise-svs:v3.23.4"
' -i calico-enterprise-svs.yaml
tip

To make the reference immutable, pin it to a digest. The last line of the imgpkg copy --to-repo output shows the digest of the copied bundle. In the yq command, replace :v3.23.4 with @sha256:<digest>.

Step 5: Upload the package to the Supervisor​

Upload the updated Package and PackageMetadata resources from calico-enterprise-svs.yaml on the vSphere Client Supervisor Management page, as described in Part 1. When you register the Supervisor Service, set these values in the service YAML configuration:

  • chartRepository: the Helm chart path from Step 1.
  • registryName: the name you registered the private registry under on the Container Registries page.
caution

You can set chartRepository only once for each version of the Supervisor Service. You can't change it later.

Copy the images to the private registry​

Before you create guest clusters, copy the Calico Enterprise images to the private registry, and configure the cluster to pull them from there.

  1. Copy the Calico Enterprise images from quay.io/tigera to the private registry. Follow the steps in Push Calico Enterprise images to your private registry. Don't push Calico Enterprise images to a public registry.

  2. If the private registry requires authentication, register it with its credentials on the vSphere Client Container Registries page. Use the name you register it under as registryName when you register the Supervisor Service. See Step 5: Upload the package to the Supervisor.

  3. Add the private registry to the installation section of the AddonConfig. For more about the AddonConfig, see Step 1 (optional): Apply the AddonConfig.

    apiVersion: addons.kubernetes.vmware.com/v1alpha1
    kind: AddonConfig
    metadata:
    name: <cluster-name>-calico-enterprise
    namespace: <cluster-namespace>
    spec:
    values:
    helmValues:
    installation:
    registry: registry.example.internal:5000/ # mirror host[:port]
    # imagePath: tigera # optional; only if you pushed all images under one path
    # imagePrefix: "" # optional; only if your mirror renames images

Next steps​

Recommended

Recommended - Networking