During deployment, the Tanzu Kubernetes Grid service is not found.

Problem

The Tanzu Kubernetes Grid service is unavailable resulting in an error message.
 status Code is 400 Bad Request, body: { "httpStatus" : "BAD_REQUEST", "error_code" : 46152, "module_name" : "NAPP", "error_message" : "Error while fetching kubernetes cluster id." }

Cause

The NSX Application Platform Automation Appliance cannot fetch the Kubernetes cluster ID because the Tanzu Kubernetes Grid is unavailable.

Solution

  1. Check the cluster details in the NSX Application Platform Automation Appliance.
    kubectl --kubeconfig napp-deploy-k-default.yml get ns kube-system -o yaml
    kubectl --kubeconfig napp-deploy-k-default.yml cluster-info
  2. Open the Kubeconfig file.
  3. Check the cluster - certificate-authority-data and user-token under napp-admin entries.
  4. Verify that there are no underlying errors before you proceed to the next step.
  5. In the NSX Application Platform Automation Appliance deployment wizard, navigate to the Deploy TKG tab and click Update & Redeploy.

    The Tanzu Kubernetes Grid deployment completes successfully.