This KB outlines steps to migrate from a manually registered Antrea NSX Interworking adapter (provisioned via manual manifests or ArgoCD) to a VKr-managed auto-registered adapter.
VMware NSX
VMware Antrea
VMware vSphere Kubernetes Service
kubectl -n vmware-system-nsx get cm nsx-ncp-config -o yamlcurl -k -u admin:${NSX_ADMIN_PASSWORD} https://${NSX_IP}/api/v1/cluster/nodes | grep fqdn"<supervisor-id>-<vsphere-namespace-of vks-cluster>-<vks-cluster-name>-antrea"
apiVersion: v1kind: Secretmetadata: name: host-alias-overlay namespace: vmware-system-tkgstringData: add-host-aliases.yml: | #@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind": "Deployment", "metadata": {"name": "interworking"}}), expects="0+" --- spec: template: spec: #@overlay/match missing_ok=True hostAliases: - ip: "198.51.100.21" # <--- Change to your NSX IP hostnames: - "web-node01.internal.example.com" # <--- Change to your NSX FQDN - ip: "198.51.100.22" # <--- Change to your second NSX IP hostnames: - "web-node02.internal.example.com" # <--- Change to your second NSX FQDN - ip: "198.51.100.23" # <--- Change to your third NSX IP hostnames: - "web-node03.internal.example.com" # <--- Change to your third NSX FQDN
kubectl -n vmware-system-tkg edit pkgi cluster-default-antreaExample pkgi with annotationapiVersion: packaging.carvel.dev/v1alpha1kind: PackageInstallmetadata: annotations: ext.packaging.carvel.dev/ytt-paths-from-secret-name.0: host-alias-overlay # <--- Add this annotation tkg.tanzu.vmware.com/cluster-name: cluster-default tkg.tanzu.vmware.com/cluster-namespace: antrea-test creationTimestamp: "2026-06-12T11:40:24Z" finalizers: - finalizers.packageinstall.packaging.carvel.dev/delete generation: 1 name: cluster-default-antrea namespace: vmware-system-tkg resourceVersion: "580017" uid:######-####-####-####-########spec: packageRef: refName: antrea.tanzu.vmware.com versionSelection: constraints: 2.4.4+vmware.1-tkg.1 prereleases: {} serviceAccountName: tanzu-cluster-bootstrap-sa syncPeriod: 10m0s values: - secretRef: name: cluster-default-antrea-data-valuesstatus: conditions: - status: "True" type: ReconcileSucceeded friendlyDescription: Reconcile succeeded lastAttemptedVersion: 2.4.4+vmware.1-tkg.1 observedGeneration: 1 version: 2.4.4+vmware.1-tkg.1root@######## [ ~ ]# kubectl -n vmware-system-tkg get pkgi cluster-default-antreaNAME PACKAGE NAME PACKAGE VERSION DESCRIPTION AGE PAUSEDcluster-default-antrea antrea.tanzu.vmware.com 2.4.4+vmware.1-tkg.1 Reconcile succeeded 11dkubectl -n vmware-system-antrea exec -it interworking-5d8d9dd58c-t7zxj -- curl -kv https://web-node01.internal.example.comkubectl -n vmware-system-antrea get deploy interworking -oyaml... dnsPolicy: ClusterFirst hostAliases: - hostnames: - web-node01.internal.example.com # <--- First NSX FQDN ip: 198.51.100.21 # <--- First NSX IP - hostnames: - web-node02.internal.example.com # <--- Second NSX FQDN ip: 198.51.100.22 # <--- Second NSX IP - hostnames: - web-node03.internal.example.com # <--- Third NSX FQDN ip: 198.51.100.23 # <--- Third NSX IP hostNetwork: true...kubectl -n vmware-system-antrea exec -it interworking- -- cat /etc/hosts########Defaulted container "election-runner" out of: election-runner, mp-adapter, tn-proxy, ccp-adapter
Kubernetes-managed hosts file (host network).
::1 ipv6-localhost ipv6-loopback127.0.0.1 localhost cluster-default-trzhj-jhbgt
Entries added by HostAliases.
198.51.100.21 web-node01.internal.example.com # <--- First NSX IP and FQDN198.51.100.22 web-node02.internal.example.com # <--- Second NSX IP and FQDN198.51.100.23 web-node03.internal.example.com # <--- Third NSX IP and FQDN
kubectl -n <vsphere-namespace-of-vks-cluster> get antreaconfigkubectl -n antrea-test edit antreaconfig cluster-default-antrea-packageapiVersion: cni.tanzu.vmware.com/v1alpha1kind: AntreaConfigmetadata: name: cluster-default-antrea-package namespace: antrea-testspec: antreaNSX: enable: true # <--- Set to truekubectl -n <vsphere-namespace-of-vks-cluster> get addonconfigkubectl -n antrea-test edit addonconfig cluster-default-antreaapiVersion: addons.kubernetes.vmware.com/v1alpha1kind: AddonConfigmetadata: name: cluster-default-antrea namespace: antrea-testspec: addonConfigDefinitionRef: name: antrea.tanzu.vmware.com.2.5.1---vmware.2-tkg.1 namespace: vmware-system-vks-public clusterName: cluster-default values: antreaNSX: enable: true # <--- Set to true