Inventory Uploaded by the Kubernetes Agents

FlexNet Manager Suite 2022 R1 (On-Premises)
The Flexera Kubernetes inventory agent and the lightweight Kubernetes agent both produce inventory of the Kubernetes resources observed through the Kubernetes API, including Nodes, Pods, and Namespaces. Like all FlexNet inventory, the information is uploaded in .ndi files, and for Kubernetes inventory these use the following naming conventions (where clusterId is a short-form cluster ID):
Filename pattern Description

Primary Kubernetes resource inventory


IBM License Service data

The full Flexera Kubernetes inventory agent (only) also uploads two additional .ndi files:
Filename pattern Description (full agent only)

Container image software inventory

k8s-node-clusterId-nodeId-timestamp.ndi Worker node hardware inventory
Through the Kubernetes API, either agent receives a series of events that occur on the resources it is monitoring in the cluster. Each event occurs because a resource has been modified, and the content of the event is the new state of the modified resource. Either agent extracts the data that is relevant for the resource (based on the resource type), and maintains that data in a local cache:
  • Because the lightweight Kubernetes agent by default treats its container as immutable, it holds all its cached data in memory
  • The full Flexera Kubernetes inventory agent has local storage available, and writes its cache to that.
Specifically, either agent:
  • Read the kube-system Namespace, to obtain its UID to use as a cluster identifier (get namespace)
  • Read the cluster's version
  • Watch the Nodes resource (watch nodes)
  • Watch the Namespaces resource (watch namespaces)
  • Watch the Pods resource for each namespace (watch pods).
This process of event capture and caching occurs the entire time that either agent is running, but inventories are only produced on a set interval (by default, once every 24 hours). When the interval expires, either agent reads a snapshot of the cache, formats the data, and does one of two things:
  • If it is the lightweight Kubernetes agent, and no storage volume has been declared using the ‑‑volume switch, the content is sent directly to the inventory beacon in an HTTP request
  • In all other cases (that is, if you have assigned local storage for the lightweight Kubernetes agent, or if you are using the full Flexera Kubernetes inventory agent), the agent writes out the data in the appropriate inventory files to the persistent storage.
The .ndi files are uploaded to the inventory beacon as soon as they are completed.
The following topics detail the data uploaded in common by either of the Kubernetes agents. These consist of:
  • The primary Kubernetes resource inventory, including Nodes, Pods, and Namespaces that are observed through the Kubernetes API, and reported as a series of data classes inside the k8s-inventory-clusterId-timestamp.ndi file (for details, see Kubernetes Inventory Uploads)
  • Information collected from the IBM License Service, reported in k8s-ibm-licensing-clusterId-timestamp.ndi (for details, see Inventory from IBM License Service).

FlexNet Manager Suite (On-Premises)

2022 R1