Observe NVKE and its clusters
This page describes how to check the health of the NVIDIA Kubernetes Engine (NVKE) management plane and the workload clusters it manages, and where to find their logs, metrics and dashboards. You use it after Run NVKE end to end on one machine, and whenever you need to know whether NVKE and its clusters are working.
Before you begin
- You have completed Run NVKE end to end on one machine, and
nvkectl config set-sitepointsnvkectlat your NVKE API and the management cluster’s kubeconfig. If API authentication is on,nvkectlpoints at an OpenID Connect (OIDC) kubeconfig instead, as described in Secure the NVKE API. With that kubeconfig,nvkectl get providersandnvkectl get kubeconfigfail, because they read the management cluster’s Kubernetes API, which does not accept your identity provider’s tokens; the steps that use them give akubectlalternative. kubectluses the management cluster’s admin kubeconfig, for example withexport KUBECONFIG=<CLUSTER_NAME>.kubeconfig, where<CLUSTER_NAME>is the management cluster’s name.- You have
curlandjq. - If you change the management plane’s values below, run the install from a shell with the
NVKECTL_*variables exported, as described in Run NVKE end to end on one machine. - You know
<MANAGEMENT_ADDRESS>, the management cluster’s API virtual IP address (VIP), or the node IP of a single-node management cluster. The NVKE API is athttp://<MANAGEMENT_ADDRESS>:30080. If API authentication is on, add-H "Authorization: Bearer <TOKEN>"to eachcurlcommand that calls/api/, where<TOKEN>is a JSON Web Token (JWT) from your identity provider, as described in Secure the NVKE API./healthzand/readyzneed no token.
Check the management plane
-
Check that the management plane is rolled out.
The output ends with
successfully rolled out. -
Check that the NVKE API is ready.
A ready management plane returns HTTP 200 and
{"status":"ok","checks":{"database":"ok","temporal":"ok"}}. If a check fails, the endpoint returns HTTP 503 with"status":"unavailable"and the error in place ofokfor that check. The result is cached for 5 seconds./healthzchecks nothing beyond the API process serving HTTP. -
List the management cluster’s pods that are not running.
A healthy management cluster prints
No resources found. The management plane depends on the pods in thenke-controller,postgres,temporal,spire-server,spire-systemandcapnico-systemnamespaces. -
Check the infrastructure provider.
The
nicorow, for NVIDIA Infra Controller (NICo), readsCONFIGUREDandREPLICASreads1/1or more.CONFIGUREDmeans the provider’s resource definitions exist, its controller is available and its credentials Secret exists. It does not test the credentials against NICo. TheCREDENTIALScolumn reports CAPNICo’s own check of them where CAPNICo servesNicoIdentity; with the CAPNICo release the install deploys, it readsUNSUPPORTED.DEGRADEDmeans the provider’s controller is not available, andUNKNOWNusually means your kubeconfig cannot read Secrets in the provider’s namespace.With API authentication on, this command fails. Check the provider with
kubectlinstead:The Deployment
controller-managershows all replicas ready, and the Secretnico-credentialsis listed.
Read the management plane logs
The management plane writes one JSON object per log line to standard output, with the keys time, level and msg.
-
Show recent warnings and errors.
-
Follow the logs while you reproduce a problem.
The default level is info. To log at debug, save these values as controller-log.yaml in the directory above the nvke/ checkout:
Then run the install command from Run NVKE end to end on one machine again, with the same flags and --values-for controller=../controller-log.yaml added. Your env list replaces the deploy path’s list, which sets NODE_AGENT_PORT, so keep that entry. LOG_LEVEL accepts debug, info, warn and error. If you turned on API authentication, also pass --values-for controller=../auth-values.yaml, or the install turns authentication off; see Secure the NVKE API. If you passed --values-for nktp=<FILE> when you installed, pass it again, or NKTP goes back to the bundled development backend.
Read the management plane metrics
The management plane serves Prometheus metrics at /metrics on port 9090 of its pod. NVKE telemetry pipeline (NKTP) scrapes them, as described in Find the management cluster’s telemetry. To read them directly:
-
Forward the metrics port to your machine.
-
In a second shell, list the NVKE series.
The series that answer the most common questions:
node_type is cp for control-plane nodes and worker for workers. The tenant_cluster label holds the workload cluster’s name.
A NetworkPolicy admits scrapes of port 9090 only from a fixed set of namespaces, including monitoring, and from the namespaces in the metrics.networkPolicy.additionalNamespaces value, which the deploy path sets to nktp. To scrape from a Prometheus in another namespace, write that value, with nktp and the new namespace in the list, to a values file, and run the install again with --values-for controller=<FILE> added. If you turned on API authentication, also pass --values-for controller=../auth-values.yaml, or the install turns authentication off; see Secure the NVKE API. If you passed --values-for nktp=<FILE> when you installed, pass it again, or NKTP goes back to the bundled development backend.
Check workload clusters and node pools
-
List the workload clusters.
With API authentication on,
nvkectlmust use an OIDC kubeconfig for this and the next two steps; with the management cluster’s admin kubeconfig every NVKE API call fails.A healthy cluster’s
STATUSisProvisioned.Provisioning,Updating,Upgrading,RecyclingandDeletingmean an operation is running.ProvisioningFailedandUpdateFailedmean the last operation failed. Create a workload cluster describes each status. -
Read the conditions of a cluster whose status is not
Provisioned.<WORKLOAD_CLUSTER>is the workload cluster’s name. Each entry underconditionshas astatus, alastTransitionTimeand amessage. Themessageof the condition that last changed usually names the cause. -
List the cluster’s node pools.
Each pool’s
STATUSisProvisionedonce the cluster is provisioned, even while its nodes join.DESIREDis the node count you asked for. -
List the cluster’s nodes and the conditions NVKE tracks for them.
A healthy node reads
True,True,True,False,False: provisioned,Readyin Kubernetes,nvke-agenthealthy, and not marked for replacement or repair. A node is marked for replacement or repair when its Kubernetes node carries the conditionnvke.nvidia.com/NeedsRecycleornvke.nvidia.com/NeedsRepair(a node last reconciled by an older controller may still carry thenke.nvidia.com/form, which NVKE also reads), set by auto mode or by a break-fix system you run. Manage node pools describes what NVKE does next. -
Check the Cluster API objects behind the cluster.
NVKE creates each workload cluster’s Cluster API objects in the
nvke-systemnamespace of the management cluster, named after the cluster. The output shows the readiness of the control plane and of each machine, with the reason for any that is not ready. -
Check the nodes from inside the workload cluster.
With API authentication on, this command fails; get the file with
kubectlas described in Get the admin kubeconfig instead.Every node is
Ready. The kubeconfig grants cluster-admin; see Access a workload cluster.
Find the management cluster’s telemetry
The install deploys NKTP in the nktp namespace of the management cluster. NKTP collects the cluster’s logs, metrics and Kubernetes Events, scrapes the management plane through the ServiceMonitor nke-controller-metrics, receives its traces, and labels everything with k8s.cluster.name set to the management cluster’s name.
By default NKTP exports to a bundled development backend, with Grafana, Prometheus, Loki and Tempo in one pod that keeps data in memory. To look at it, forward Grafana to your machine and open http://127.0.0.1:3000. This Grafana gives every anonymous user the Admin role, so keep the port forward bound to 127.0.0.1 and use it only for evaluation.
To keep the data, send it to your own backend: write a values file as described under “Set a backend” in Getting started with NKTP, and run the install from Run NVKE end to end on one machine again with --values-for nktp=<FILE> added. If you turned on API authentication, also pass --values-for controller=../auth-values.yaml, or the install turns authentication off; see Secure the NVKE API.
NVKE installs neither NKTP nor cert-manager in workload clusters. NKTP collects only from the management cluster, where the install deploys it; for workload clusters you have the management plane’s metrics, which describe each cluster, node pool and node as NVKE tracks them. Getting started with NKTP describes NKTP itself.
Import the reference dashboards
The repository includes three Grafana dashboards for NVKE in controller/deploy/dashboards/. NVKE does not install them. Import them into the Grafana that reads your backend, or into the bundled development Grafana.
- In Grafana, open Dashboards, then New, then Import.
- Upload a file from
controller/deploy/dashboards/. - When Grafana prompts for
DS_PROMETHEUS, select your Prometheus data source. - Import. Importing the same file again updates the dashboard rather than creating a copy.
The $cluster variable lists the values of the k8s_cluster_name label, which NKTP sets from k8s.cluster.name. If the list is empty, the exported data has no cluster name. Each dashboard has a Requirements and scope panel; an empty optional row means that data is not scraped, not that something failed.
Verify
-
In Grafana, open Explore, select the Prometheus data source, and run this query:
The result has one series for each workload cluster that
nvkectl get clusterslists. -
Open
Reference - NVKE Management Cluster Healthand select the management cluster’s name in the$clusterlist. The panels show data.
Next steps
- Troubleshoot a failure that these checks find.
- Manage node pools to replace or scale nodes.
- Getting started with NKTP to tune NKTP and scrape your own services.