Follow these steps to expose a native cluster using VMware Cloud Director Container Service Extension.

To expose a native cluster, it is necessary to edit the specification section in the native cluster configuration file before cluster creation.
Note: It is not possible to expose the cluster after creation.

Procedure

  1. To generate a sample native cluster configuration file, open vcd cse and enter the following command:
    vcd cse cluster apply -s --native        

    The following code is an example of a native cluster configuration yaml file:

    apiVersion: cse.vmware.com/v2.1
    kind: native
    metadata:
      name: native1
      orgName: org1
      virtualDataCenterName: ovdc1
      site: https://vcd.com
    spec:
      distribution:
        templateName: ubuntu-20.04_k8-1.23_weave-2.8.1
        templateRevision: 1
      settings:
        network:
          expose: true
        ovdcNetwork: ovdc1_nw
        sshKey: 'ssh-key'
        rollbackOnFailure: true
      topology:
        controlPlane:
          count: 1
          storageProfile: '*'
        workers:
          count: 1
          storageProfile: '*'
        nfs:
          count: 0
          storageProfile: '*'
  2. In the spec section of the native cluster configuration yaml file, set expose to True.
    expose : True
  3. To create a native cluster, enter the following command in vcd cse:
    vcd cse cluster apply <native_cluster.yaml>

    .

Hide a Native Cluster

Follow these steps to deactivate the expose functionality and hide a native cluster.

Procedure

  1. In vcd cse, in the spec section in the native cluster configuration file, set expose to False:
    expose : False
  2. Enter the following command to apply updates:
    vcd cse cluster apply <native_cluster.yaml>