Inventory Uploaded by the Kubernetes Agents
IT Asset Management
(Cloud)
The Flexera Kubernetes Inventory Agent and the Lightweight Kubernetes Inventory Agent both produce inventory of
the Kubernetes resources observed through the Kubernetes API, including
The full Flexera Kubernetes Inventory Agent (only) also uploads two additional
.ndi files:
Node
s, Pod
s, and Namespace
s. 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 |
---|---|
k8s-inventory-clusterId-timestamp.ndi |
Primary Kubernetes resource inventory |
k8s-ibm-licensing-clusterId-timestamp.ndi |
IBM License Service data |
Filename pattern | Description (full agent only) |
---|---|
k8s-image-imageId.ndi |
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 Inventory 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 Inventory 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 Inventory 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 following topics detail the data uploaded in common by either of the Kubernetes
agents. These consist of:
- The primary Kubernetes resource inventory, including
Node
s,Pod
s, andNamespace
s 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).
IT Asset Management (Cloud)
Current