To provision a Tanzu Kubernetes cluster in an air-gapped environment, create a cluster using the virtual machine image synchronized from a Local Content Library.

For the distribution.version value, you can enter either the full image name or, if you kept the name format from the image directory, you can shorten it to the Kubernetes version. If you want to use a fully qualified version number, replace ----- with +. For example, if you have an OVA image named photon-3-k8s-v1.17.8---vmware.1-tkg.1.5417466, the following formats are acceptable.
spec:
  distribution:
    version: v1.17.8
spec:
  distribution:
    version: v1.17.8+vmware.1-tkg.1
spec:
  distribution:
    version: v1.17.8+vmware.1-tkg.1.5417466
```

Procedure

  1. Update cluster specification file with the image version you downloaded.
    For example:
    apiVersion: run.tanzu.vmware.com/v1alpha1
    kind: TanzuKubernetesCluster
    metadata:
        name: dev-cluster
        namespace: cltest
    spec:
       topology:
           controlPlane:
               count: 3
               class: best-effort-xsmall
               storageClass: high-performance-ssd
           workers:
               count: 3
               class: best-effort-xsmall
               storageClass: high-performance-ssd
       distribution:
            version: v1.17.8         
       settings:
            network:
              cni:
                  name: antrea  #But could be left blank if using the default
              services:
                 cidrBlocks: ["198.51.100.0/12"]
              pods:
                 cidrBlocks: ["192.0.2.0/16"]
  2. To create a cluster, run the following command.
    kubectl apply -f CLUSTER-NAME.yaml