To enable tenants with provisioned Kubernetes clusters to deploy container applications from configured VMware Marketplace and Helm chart repository content resources into VMware Cloud Director catalogs, you must install the Kubernetes operator.

Configuration of the Kubernetes Cluster Owner

The Kubernetes cluster owner is the tenant user that deploys and has administrative control over the Kubernetes cluster.

The Kubernetes operator uses the API token of the Kubernetes cluster owner for communication with VMware Cloud Director and for carrying out container application management operations.

To enable the installation of the Kubernetes operator, an organization administrator must first assign additional permissions to the owner of the Kubernetes cluster where the operator is going to be installed.

Install a Kubernetes Operator in Your VMware Cloud Director Tenant Portal

To deploy container applications from external content sources, in VMware Cloud Director Tenant Portal, you must install a Kubernetes operator.

Prerequisites

  • Verify that the owner of the Kubernetes cluster, where you are installing the operator, has the following permissions.
    • All rights from the global Kubernetes Cluster Author role. The Kubernetes Cluster Author role is automatically created during the VMware Cloud Director Container Service Extension server configuration process. For more information, see the VMware Cloud Director Container Service Extension documentation.
    • Full management control of the Kubernetes cluster.
    • The additional VMware Cloud Director rights: Manage Container App, Reconcile Container App, and Full Control: VMWARE: KUBECLUSTEREXTENSION.
  • Verify that you have full administrative control of the Kubernetes cluster, where you are installing the Kubernetes operator, and the Full Control: VMWARE:CAPVCDCLUSTER and View: VMWARE: KUBECLUSTEREXTENSION rights.

Procedure

  1. From the top navigation bar, select Content Hub.
  2. From the left panel, select Kubernetes Operator.
  3. On the Kubernetes Operator page, select the Kubernetes cluster on which you want to install the Kubernetes operator, and click Install Operator.
  4. Select the type of the source location for the Kubernetes operator package.
    Option Description
    VMware Registry

    If the Kubernetes cluster has access to the Internet, you can install the Kubernetes operator by using the official Content Hub Kubernetes operator package from the public VMware container registry.

    Custom Registry

    If the Kubernetes cluster does not have access to the Internet, install the Kubernetes operator by using a custom registry.

    You must clone the official Content Hub Kubernetes operator package from the public VMware container registry to your custom registry. The Content Hub Kubernetes operator package must be in the Carvel format and you must use the Carvel imgpkg tool for cloning the package. For information about the imgpkg tool, see the Carvel imgpkg documentation.

    Note: To use custom registry, copy the version of the official Content Hub Kubernetes operator package from the public VMware container registry.
  5. If you want to use a custom registry, enter the path to the custom registry that stores the cloned Content Hub Kubernetes operator package, and the version of the official Content Hub Kubernetes operator package from the public VMware container registry.
  6. Click Install Operator.

Results

After the successful installation, VMware Cloud Director creates two namespaces within the Kubernetes cluster. In the first namespace, vcd-contenthub-system, VMware Cloud Director installs the Content Hub operator manager. The second namespace, vcd-contenthub-workloads, remains empty. VMware Cloud Director uses this namespace to deploy container applications at a later stage.

Edit a Kubernetes Operator in Your VMware Cloud Director Tenant Portal

Using the VMware Cloud Director Tenant Portal, you can update the package location and redeploy the Kubernetes operator.

Successfully updating the location and version of the Kubernetes operator automatically redeploys the operator.

Prerequisites

  • Verify that the owner of the Kubernetes cluster, where you are installing the operator, has the following permissions.
    • All rights from the global Kubernetes Cluster Author role. The Kubernetes Cluster Author role is automatically created during the VMware Cloud Director Container Service Extension server configuration process. For more information, see the VMware Cloud Director Container Service Extension documentation.
    • Full management control of the Kubernetes cluster.
    • The additional VMware Cloud Director rights: Manage Container App, Reconcile Container App, and Full Control: VMWARE: KUBECLUSTEREXTENSION.
  • Verify that you have full administrative control of the Kubernetes cluster, where you are installing the Kubernetes operator, and the Full Control: VMWARE:CAPVCDCLUSTER and View: VMWARE: KUBECLUSTEREXTENSION rights.

Procedure

  1. From the top navigation bar, select Content Hub.
  2. From the left panel, select Kubernetes Operator.
  3. On the Kubernetes Operator page, select the Kubernetes cluster on which you want to update the Kubernetes operator, and click Edit Operator.
  4. Select the type of the source location for the Kubernetes operator package.
    Option Description
    VMware Registry

    If the Kubernetes cluster has access to the Internet, you can install the Kubernetes operator by using the official Content Hub Kubernetes operator package from the public VMware container registry.

    Custom Registry

    If the Kubernetes cluster does not have access to the Internet, install the Kubernetes operator by using a custom registry.

    You must clone the official Content Hub Kubernetes operator package from the public VMware container registry to your custom registry. The Content Hub Kubernetes operator package must be in the Carvel format and you must use the Carvel imgpkg tool for cloning the package. For information about the imgpkg tool, see the Carvel imgpkg documentation.

    Note: To use custom registry, copy the version of the official Content Hub Kubernetes operator package from the public VMware container registry.
  5. If you want to use a custom registry, enter the path to the custom registry that stores the cloned Content Hub Kubernetes operator package, and the version of the official Content Hub Kubernetes operator package from the public VMware container registry.
  6. Click Edit Operator.

Uninstall a Kubernetes Operator from Your VMware Cloud Director Tenant Portal

You can delete the Kubernetes operator and all container applications it manages from the VMware Cloud Director Tenant Portal by uninstalling the operator.

After uninstalling the Kubernetes operator from Content Hub, you must delete the Kubernetes operator namespaces and resources from the Kubernetes cluster.

Prerequisites

  • Verify that the owner of the Kubernetes cluster, where you are installing the operator, has the following permissions.
    • All rights from the global Kubernetes Cluster Author role. The Kubernetes Cluster Author role is automatically created during the VMware Cloud Director Container Service Extension server configuration process. For more information, see the VMware Cloud Director Container Service Extension documentation.
    • Full management control of the Kubernetes cluster.
    • The additional VMware Cloud Director rights: Manage Container App, Reconcile Container App, and Full Control: VMWARE: KUBECLUSTEREXTENSION.
  • Verify that you have full administrative control of the Kubernetes cluster, where you are installing the Kubernetes operator, and the Full Control: VMWARE:CAPVCDCLUSTER and View: VMWARE: KUBECLUSTEREXTENSION rights.

Procedure

  1. From the top navigation bar, select Content Hub.
  2. From the left panel, select Kubernetes Operator.
  3. On the Kubernetes Operator page, select the Kubernetes cluster from which you want to remove the Kubernetes operator, and click Uninstall Operator.
  4. Copy the commands for the deletion of the Kubernetes operator namespaces and resources by clicking Copy to clipboard.
  5. Click Uninstall.
  6. Log in to the Kubernetes cluster by using the Kubernetes kubectl command-line tool and run the following commands.
    kubectl delete pkgi vcd-contenthuboperator-install -n vcd-contenthub-system
    kubectl delete clusterrole vcd-contenthuboperator-install
    kubectl delete clusterrolebinding vcd-contenthuboperator-install
    kubectl delete ns vcd-contenthub-workloads
    kubectl delete ns vcd-contenthub-system
    Note:

    To prevent leaving unused resources on the cluster, wait for the operation to complete.