Skip to main content

Node Count

Styra DAS calculates Kubernetes node count through the following metrics:

  • The node count for the Kubernetes cluster is sampled hourly from data returned by the Kubernetes API Server.
  • The node count displayed in the Usage pane is the average of those samples over the last month.

Node Count through the Styra DAS UI

Use the following steps to view the node count in the Styra DAS UI.

  1. Login to the Styra DAS UI as a user with the WorkspaceAdministrator role.
  2. Click the user icon.
  3. Click Usage.

The bottom of the list displays Kubernete nodes.

Node Count through the Styra DAS API

The following command displays the current Kubernetes node count as reported by the Styra DAS datasources-agent API:

curl -X POST -H "Authorization: Bearer ${STYRA_TOKEN}"  -H 'Content-Type: application/json' https://${TENANT}${SYSTEM_ID} -d '{"rego": "count(data.kubernetes.resources.nodes)"}'

Replace ${STYRA_TOKEN}, ${TENANT}, and ${SYSTEM_ID} with your values in the above command.