To register an Antrea container cluster to NSX-T Data Center, you must submit the bootstrap-config.yaml file and the interworking.yaml Deployment manifest file to the Kubernetes API server.

Prerequisites

Ensure that:

Procedure

  1. Run the following kubectl command to submit the .yaml files to the Kubernetes API server:
    $ kubectl apply -f bootstrap-config.yaml -f interworking.yaml

    Ensure that bootstrap-config.yaml file comes first in the command.

    This command registers the Antrea container cluster to NSX-T. The register-xxx and interworking-yyy Pods are deployed in the vmware-system-antrea namespace.

    Where: xxx and yyy are arbitrary numbers that represent instance IDs of the Pods in your cluster.

  2. Run the following kubectl command to view the list all Pods in the vmware-system-antrea namespace:
    $ kubectl get pods -o wide -n vmware-system-antrea

    Verify that status of the register Pod is Completed and the status of the interworking Pod is Running.

    The containers of the Management Plane Adapter and the Central Control Plane Adapter in the interworking Pod now start running in the Antrea container cluster. The resources in the Antrea container cluster are synced with the NSX-T inventory.
    Note: After the Antrea container cluster is registered to NSX-T, the Management Plane Adapter connects with the NSX Management Plane and performs a full synchronization of the Antrea cluster resources in the NSX-T inventory. The time required to do a full sync operation is directly proportional to the scale of the cluster. Thereafter, only a delta synchronization operation happens at regular predefined intervals. If the Management Plane Adapter fails due to any reason, the resources are not synced with the NSX-T inventory. Only after the adapter is up again, the resources in the Antrea container cluster are compared with the existing objects in the NSX-T inventory and the difference (delta) is synchronized.
  3. Perform this step only when your Antrea container cluster uses Kubernetes version ≤ 1.20.
    1. Run the following kubectl command to register the Antrea Controller webhook on namespace creating events.
      $ kubectl apply -f ns-label-webhook.yaml

      You can find this Webhook definition file in the antrea-interworking-version.zip file, which you downloaded from the Download VMware Antrea page.

    2. Restart the Antrea Controller Pod.
      kubectl rollout restart deployment antrea-controller -n kube-system

      This command deletes the existing Antrea Controller Pod and creates a new Antrea Controller Pod.

    3. Verify whether the new Antrea Controller Pod is running.
      $ kubectl get pod -l component=antrea-controller -n kube-system

What to do next

View the inventory of Antrea container cluster resources, such as Pods, Namespaces, Antrea Network Policies, Antrea Cluster Network Policies, and other resources in the NSX Manager UI.