Last Action Description: Instance update failed: There was a problem completing your request. Please contact your operations team providing the following information: service: p.pks, service-instance-guid: <cluster-guid>, broker-request-id: <request-id>, task-id: <bosh-task-id>, operation: update, error-message: Action Failed get_task: Task <task-id> result: 1 of 9 pre-start scripts failed. Failed Jobs: pks-nsx-t-prepare-master-vm. Successful Jobs: etcd, kube-apiserver, config_scanner, bpm, bosh-dns, syslog_forwarder, ncp, pks-nsx-t-ncp.# bosh -d service-instance_<cluster-guid> ssh <master-instance-name># sudo -i# cat /var/vcap/sys/log/pks-nsx-t-prepare-master-vm/pre-start.stdout.logCurrent cluster NSX API mode: ManagerRegistering client certificate<client-certificate-id>Registration of client certificate is successfulChecking if client certificate is ready to be used2025-05-09T15:49:37Z 1: checking client certificate...querying NSXAPI get error: "context deadline exceeded"querying NSXAPI get error: "context deadline exceeded"timeout: client certificate is not working after 60 secondsThe error indicates connection problems with NSX Manager from the master VM.
TKGi with NSX
The NSX Translated IP address for the cluster's SNAT rule is also assigned to some other NSX object causing intermittent misrouting.
# curl -kv -X GET --cert /var/vcap/jobs/pks-nsx-t-prepare-master-vm/config/nsx_t_superuser.crt --key /var/vcap/jobs/pks-nsx-t-prepare-master-vm/config/nsx_t_superuser.key https://<NSX-MG-FQDN>/api/v1/node# /var/vcap/packages/pks-nsx-t-cli/bin/pksnsxcli create principal \ --api-type="Manager" \ --instance-id="<cluster-guid>" \ -c "/var/vcap/jobs/pks-nsx-t-prepare-master-vm/config/nsx_t_superuser.crt" \ -k "/var/vcap/jobs/pks-nsx-t-prepare-master-vm/config/nsx_t_superuser.key" \ -C "/var/vcap/jobs/pks-nsx-t-prepare-master-vm/config/nsx_t_client.crt" \ --nsx-ca-cert-path="/var/vcap/jobs/pks-nsx-t-prepare-master-vm/config/nsx_t_ca.crt" \ --insecure='false' \ --nsx-manager-host='<NSX-MG-FQDN>' || exit $?# for i in $(seq 24); do /var/vcap/packages/pks-nsx-t-cli/bin/pksnsxcli check \ --api-type="Manager" \ -c "/var/vcap/jobs/pks-nsx-t-prepare-master-vm/config/nsx_t_client.crt" \ -k "/var/vcap/jobs/pks-nsx-t-prepare-master-vm/config/nsx_t_client.key" \ --nsx-ca-cert-path="/var/vcap/jobs/pks-nsx-t-prepare-master-vm/config/nsx_t_ca.crt" \ --insecure='false' \ --nsx-manager-host='<NSX-MG-FQDN>' || exit $? echo "$(date +%Y-%m-%dT%H:%M:%SZ) ${i}: checking client certificate..."doneIf the above checks show several NSX elements associated to the same Translated IP address, you need to inspect those additional elements (i.e. another cluster's SNAT rule, Virtual Servers, etc.) and work with your network team to eliminate the duplicities.
Other related KBs with pks-nsx-t-prepare-master-vm failed job symptoms:
How to rotate Tanzu Kubernetes Grid Integrated Edition tls-nsx-t cluster certificate
Principle Identity based Workflows impacted after NSX T upgrade to 3.2.X from 3.0.X