TKGi cluster creation in NSX-T fails with error cannot unmarshal string into Go struct field
search cancel

TKGi cluster creation in NSX-T fails with error cannot unmarshal string into Go struct field

book

Article ID: 298513

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

Symptoms:
Cluster creation using the pks cli fails with error message

tkgi create-cluster oom --external-hostname outofmemory --plan small -n 2

Error: Error creating NSX-T cluster network `pks-########-3c20-4ac7-a331-############`: json: cannot unmarshal string into Go struct field APIError.error_code of type int64

Environment

 

Cause

The principal identity with superuser permissions configured under NSX Manager Super User Principal Identity Certificate is missing under Principal Identities. This is how to see these options:
Go to TKGi Tile, select Networking, select NSX Manager Super User Principal Identity Certificate. 
Go to NSX-T Manager, select System, select Users, select Principal Identities.

In this scenario NSX-T manager returns a response which can not be decoded by TKGi CLI.

Resolution

Re-register the NSX Manager's super user principal identity certificate using these instructions.