vSphere IaaS control plane requires specific networking configuration to allow you to connect to the Supervisors, vSphere Namespaces, and all objects that run inside the namespaces.
Follow the instructions for installing and configuring the NSX for managing Kubernetes workloads documented in the Installing and Configuring vSphere IaaS Control Plane guide.
First, you need to create a vSphere Distributed Switch and a distributed port group for each NSX Edge uplink. To automate this step, use the Web Services APIs as described in the vSphere Web Services SDK Programming Guide. Then, you can use the NSX REST APIs to add a compute manager, create transport zones, and perform other steps required for configuring the NSX for vSphere IaaS control plane.