Symptoms:
While installing or upgrading PKS in an NSX-T environment, NSX-T validation error fails with the below error as seen from Apply Changes log
Stderr ERROR: Failed to find datacenter Datacenter due to: govc: expected element type <Envelope> but have <html> ERROR: NSX-T Precheck failed due to Unable to check if esxi hosts are onboarded since hosts are empty
The vcenter host under Kubernetes Provider for PKS tile contains a URL (ex - https://vcenter1.domain.com/), Operations (Ops) Manager field validation passes but NSX-T validation error fails with below error:
Stderr ERROR: Failed to find datacenter Datacenter due to: govc: expected element type <Envelope> but have <html> ERROR: NSX-T Precheck failed due to Unable to check if esxi hosts are onboarded since hosts are empty
While running NSX-T validation errand govc utility is used. govc tries to get datacenter info using the vcenter host provided in the Ops Manager tile. Due to
" /
" present at the end of the URL govc returns a http response code 400 as an html object which is not the expected return format.
The vcenter host under Kubernetes Provider for PKS tile change value to vCenter FQDN, in this case vcenter1.domain.com.