Creating an air-gapped vSphere FIPS Managed cluster with the DKP CLI assumes that you already fulfilled all of the prerequisites and successfully created a vSphere Management cluster. Use this procedure to create a Managed vSphere cluster.

When creating Managed clusters, you do not need to create and move CAPI objects, or install the Kommander component. Those tasks are only done on Management clusters!

Choose a Workspace for the New Cluster

  1. If you have an existing Workspace name, run this command to find the name:
    ⚠️ NOTE: If you need to create a new Workspace, follow the instructions to Create a Workspace.

    kubectl get workspace -A
    CODE
  2. When you have the Workspace name, set the WORKSPACE_NAMESPACE environment variable:

    export WORKSPACE_NAMESPACE=<workspace_namespace>
    CODE

Name your cluster

  1. Give your cluster a unique name suitable for your environment.

  2. Set the CLUSTER_NAME environment variable with the command:

    export CLUSTER_NAME=<my-managed-vsphere-cluster>
    CODE

DKP uses local static provisioner as the default storage provider. However, localvolumeprovisioner is not suitable for production use. You should use a Kubernetes CSI compatible storage that is suitable for production.

  • You can choose from any of the storage options available for Kubernetes. To disable the default that Konvoy deploys, set the default StorageClasslocalvolumeprovisioner as non-default. Then set your newly created StorageClass to be the default by following the commands in the Kubernetes documentation called Changing the Default Storage Class.

Create a new vSphere Kubernetes cluster

Use the following steps to create a new, air-gapped vSphere cluster.

  1. Configure your cluster to use an existing Docker registry as a mirror when attempting to pull images:
    IMPORTANT: The image must be created by Konvoy Image Builder so that it uses the registry mirror feature.

    export REGISTRY_URL=<https/http>://<registry-address>:<registry-port>
    export REGISTRY_CA=<path to the CA on the bastion>
    export REGISTRY_USERNAME=<username>
    export REGISTRY_PASSWORD=<password>
    CODE
    • REGISTRY_URL: the address of an existing Docker registry accessible in the VPC that the new cluster nodes will be configured to use a mirror registry when pulling images.

    • REGISTRY_CA: (optional) the path on the bastion machine to the Docker registry CA. Konvoy will configure the cluster nodes to trust this CA. This value is only needed if the registry is using a self-signed certificate and the AMIs are not already configured to trust this CA.

    • REGISTRY_USERNAME: optional, set to a user that has pull access to this registry.

    • REGISTRY_PASSWORD: optional if username is not set.

  2. Create a Kubernetes cluster by copying the following command and substituting the valid values for your environment:

dkp create cluster vsphere \
  --cluster-name ${CLUSTER_NAME} \
  --network <NETWORK_NAME> \
  --control-plane-endpoint-host <CONTROL_PLANE_IP> \
  --data-center <DATACENTER_NAME> \
  --data-store <DATASTORE_NAME> \
  --folder <FOLDER_NAME> \
  --server <VCENTER_API_SERVER_URL> \
  --ssh-public-key-file </path/to/key.pub> \
  --resource-pool <RESOURCE_POOL_NAME> \
  --vm-template konvoy-ova-vsphere-os-release-k8s_release-vsphere-timestamp \
  --virtual-ip-interface <ip_interface_name> \
  --extra-sans "127.0.0.1" \
  --registry-mirror-url=${REGISTRY_URL} \
  --registry-mirror-cacert=${REGISTRY_CA} \
  --registry-mirror-username=${REGISTRY_USERNAME} \
  --registry-mirror-password=${REGISTRY_PASSWORD} \
  --kubernetes-version=v1.25.4+fips.0 \
  --kubernetes-image-repository=docker.io/mesosphere \
  --etcd-image-repository=docker.io/mesosphere \ 
  --etcd-version=3.5.5+fips.0 \
  --namespace=${WORKSPACE_NAMESPACE}
CODE

Manually Attach a DKP CLI Cluster to the Management Cluster

  1. Find out the name of the created Cluster, so you can reference it later:

    kubectl -n <workspace_namespace> get clusters
    CODE
  2. Attach the cluster by creating a KommanderCluster:

    cat << EOF | kubectl apply -f -
    apiVersion: kommander.mesosphere.io/v1beta1
    kind: KommanderCluster
    metadata:
      name: <cluster_name>
      namespace: <workspace_namespace>
    spec:
      kubeconfigRef:
        name: <cluster_name>-kubeconfig
      clusterRef:
        capiCluster:
          name: <cluster_name>
    EOF
    CODE

If you have existing clusters or want to create other new clusters to attach, there are many ways to attach a cluster with various requirements and restrictions. To see all the options, visit the section in documentation Day 2 - Attach an Existing Kubernetes Cluster.

At this point, you can create more clusters, perform other configuration tasks, or proceed to Day 2 Operations.