An error occurred during the NSX Metrics feature deployment while the system tried to deploy the Postgres database.
Problem
The system encountered a problem while trying to deploy the Postgres database used by the NSX Metrics feature.
Cause
There are multiple reasons for the Metrics Postgres database deployment to fail.
Solution
- Ensure that the system deployed the NSX Application Platform successfully.
- If you have access to the NSX Manager command line interface (CLI), use the following steps to investigate any errors recorded in the NSX Metrics logs. If you do not have access to the NSX Manager CLI, use the information provided in step 3.
- Log into the NSX Manager appliance as a root user.
- Mark the TKG Cluster on Supervisor or upstream Kubernetes configuration for any subsequent helm and kubectl command invocation.
export KUBECONFIG=/config/vmware/napps/.kube/config
- Use the following command to verify that the system has deployed the Metrics helm chart successfully.
helm --namespace nsxi-platform list --all --filter 'metrics'
The STATUS property must display deployed.
- Use the following command to verify that the setup pods were deployed and completed successfully.
kubectl --namespace nsxi-platform get pods --selector='app.kubernetes.io/instance=metrics,app.kubernetes.io/name=postgresql-ha'
- Using the following command, inspect the logs for the setup pods that did not deploy or are not in the Ready state.
kubectl --namespace nsxi-platform logs <POD_NAME>
- If you do not have access to the NSX Manager CLI, collect the NSX Application Platform support bundle using information in Collect the Support Bundles for the NSX Application Platform Using the UI. Inspect the support bundle logs for the TKG Cluster on Supervisor or upstream Kubernetes pods whose name start with metrics-postgresql-ha.
- Resolve the errors reported in the logs.
- After resolving the errors reported in the logs, retry deploying the NSX Application Platform using the NSX Manager UI.