Manual Installation

IT Asset Management (Cloud)
Manual installation of the Lightweight Kubernetes inventory agent is straight-forward: simply modify the YAML resources to suit your needs, and then apply them to the cluster.
Note: This process assumes that you have completed downloading and deploying the Lightweight Kubernetes inventory agent, as described in Downloading the Lightweight Kubernetes Agent.
This process requires the kubectl tool installed on your working device.

To manually install the Lightweight Kubernetes inventory agent:

  1. In your preferred flat text editor, update the deployment.yaml file as follows:
    Mandatory changes:
    1. Update the image setting in the Deployment to specify the registry where you pushed the container image (for details, see Downloading the Lightweight Kubernetes Agent). In the following example, replace the placeholder registry.example.org with the URL of your own registry; and replace the placeholder a.b.c with the version number of the Lightweight Kubernetes inventory agent.
    2. Set the --beacon flag to the URL of the inventory beacon to which the Lightweight Kubernetes inventory agent will upload its collected inventories (substituting your own value for the placeholder).
    3. During operation of the Lightweight Kubernetes inventory agent, do you want it to expose Prometheus telemetry metrics so that you can monitor performance? If so, it is mandatory to set the --metrics flag in the YAML file, as shown in this example:
    apiVersion: apps/v1
    kind: Deployment
    ...
    spec:
      template:
        spec:
          containers:
            - name: agent
              image: registry.example.org/flexera/lwk:a.b.c
              args:
                - --beacon
                - https://beacon.example.org
                - --metrics
    Note: If the Lightweight Kubernetes inventory agent is to upload to the inventory beacon using the HTTPS protocol, communications must be secured with TLS. In this case, additional edits are required in the deployment.yaml file. For details, divert now to Managing Certificates for TLS, and return here after correctly configuring for the CA certificate bundle.
    Optional changes: Add any other configuration flags that you require to the Deployment in a similar fashion. These may be labels or annotations, security context configuration, or resource limits. For details of the options that can be specified as configuration flags, see Options for the Lightweight Kubernetes Agent.

    When your changes are complete, save the updated file in place.

  2. Apply the resources to the cluster, for example using the following command lines (which here include the optional extensions, discussed below):
    cd install
    kubectl apply -f namespace.yaml
    kubectl apply -f rbac.yaml
    kubectl apply -f deployment.yaml
    kubectl apply -f extensions/prometheus-service.yaml
    kubectl apply -f extensions/prometheus-servicemonitor.yaml

Very shortly, Kubernetes instantiates your container, and the Lightweight Kubernetes inventory agent immediately begins gathering inventory about the Node, Namespace, and Pod resources in the cluster. By default, about 5 minutes later, the Lightweight Kubernetes inventory agent uploads the result to its nominated inventory beacon, by default to the path %CommonAppData%\Flexera Software\Incoming\Inventories (notice that files do not stay long in this folder, but are uploaded to the parent device in the hierarchy of inventory beacons, or to the central application server, as appropriate; but perhaps the last modified time-stamp on that folder gives some indication of work in progress). The Lightweight Kubernetes inventory agent then waits for a default 24 hours before repeating the process. (Modify these default cycle timings with the ‑‑inventory-backoff and ‑‑inventory-interval options, as described in Options for the Lightweight Kubernetes Agent.)

Extensions

Extensions support optional features that need additional cluster permissions, or leverage third-party software that may (or may not) be installed in the cluster. They are defined by .yaml files found in the install/extensions subdirectory of the downloaded archive. Available extensions are:
  • ancestry — For future expansion, and not currently supported in the web interface of IT Asset Management. As defined in the ancestry.yaml file, this:
    • Creates a new ClusterRole named flexera-lwk-ancestry
    • Uses a ClusterRoleBinding to bind that role to the service account running the Lightweight Kubernetes inventory agent.
      Tip: The service account called lwk is created in the flexera namespace by either installation method (see the list of resources created in the cluster given in Downloading the Lightweight Kubernetes Agent).
    The new role gives permission for the Lightweight Kubernetes inventory agent to read (using the get verb) additional resource types that are known to be part of the ownership hierarchy of a Pod, such as a ReplicaSet or a Deployment, and to collect identifying information (name, namespace, UID, type.) It is not recommended that you enable this extension until there is support for displaying ancestry within the web interface.
  • prometheus-service — When its --metrics flag is set, the Lightweight Kubernetes inventory agent supports exposing Prometheus metrics using an HTTP endpoint. You can create a Service to expose the metrics endpoint widely within the cluster, or outside of the cluster. The prometheus-service extension, defined in the prometheus-service.yaml file, creates this Service using values that are valid for the default configuration of the Lightweight Kubernetes inventory agent. If the --metrics flag is not set, this extension is ignored.
    Tip: To set the --metrics flag, it must be included when invoking the install script for the Lightweight Kubernetes inventory agent (see example below). The install script appends the flag to the args attribute of the container for use by the Lightweight Kubernetes inventory agent.
  • prometheus-servicemonitor — When Prometheus is installed in the cluster using prometheus-operator (see https://github.com/prometheus-operator/prometheus-operator), and Prometheus metrics are enabled on the Lightweight Kubernetes inventory agent (that is, the --metrics flag is set and the prometheus-service extension is configured), the prometheus-servicemonitor extension creates a ServiceMonitor, the custom resource type used by prometheus-operator to automatically configure Prometheus to scrape a metrics endpoint. This ServiceMonitor allows Prometheus to automatically begin scraping metrics for the Lightweight Kubernetes inventory agent.
    Important: Use only in conjunction with the prometheus-service extension.

IT Asset Management (Cloud)

Current