Downloading the Lightweight Kubernetes Agent

FlexNet Manager Suite 2022 R1 (On-Premises)

Both the Flexera Kubernetes inventory agent and the lightweight Kubernetes agent are available in a common tar archive.

The lightweight Kubernetes agent is deployed as a (Kubernetes resource) Deployment within the flexera namespace. The Pods run under a specific service account within that namespace, to which a specific custom cluster role is bound. The cluster role defines what actions the lightweight Kubernetes agent is allowed to perform.

To download and prepare the lightweight Kubernetes agent:

  1. Log on to a device that:
    • Runs a supported version of Linux
    • Has a web browser with network access to the web application server for FlexNet Manager Suite, where your account must have operator privileges to see the appropriate page
    • Has a running instance of Docker
    • Either hosts an OCI container registry, or has network access to an OCI container registry, that is available to your Kubernetes cluster.
    Tip: This process is simplified if you log in to this device using an account that has administrative privileges for your OCI container registry (otherwise you need to hand off between separate accounts during the process); and also for the Kubernetes cluster. During installation, the account requires privileges to create the following resource types:
    • Namespace
    • ServiceAccount
    • ClusterRole
    • ClusterRoleBinding
    • Deployment.
  2. In your web browser, navigate in FlexNet Manager Suite to Discovery & Inventory > Settings.
    The Inventory Settings page displays.
  3. Expand the Inventory agent for download section.
  4. Click Download Flexera Kubernetes inventory agent and save the downloaded archive file to a suitable location.
    Tip: Despite the name on the link, the downloaded archive also includes the lightweight Kubernetes agent.
  5. Extract the folders from the downloaded archive, for example with the following command line:
    tar xzf flexera-krm-operator.tar.gz
  6. Move into the directory that was extracted from the archive:
    Replace the placeholder x.y.z with the version number of the first extracted folder, and replace a.b.c with the version number included for the lwk folder for the lightweight Kubernetes agent.
    Tip: These version numbers may not be the same. It may be easier to do this in two steps, where you can check the version number in the folder name.
    cd flexera-krm-operator-x.y.z
    cd lwk-a.b.c

    This last folder contains the exported container image for the lightweight Kubernetes agent (as an exported tar archive, named flexera-lwk-a.b.c.tar where a.b.c is the version of the lightweight Kubernetes agent), the YAML resources that define the application within Kubernetes, and an (optional) installation shell script.

    As the lightweight Kubernetes agent container image is not yet available as a Docker registry, a private registry available to the cluster must be used.

  7. Import the extracted image into Docker:

    Replace a.b.c with the version number of the tar archive in the folder:

    docker load < flexera-lwk-a.b.c.tar
  8. Re-tag the image for your registry.
    Tip: If you have multiple container registries, complete the process for each one, and then circle back to repeat the process from this point for the next registry.
    In these examples, the container registry is shown as registry.example.org, which you replace with the URL of your own registry. Also replace the placeholder a.b.c with the version number of the lightweight Kubernetes agent.
    Important: The portion of the image name flexera/lwk must not be changed. Simply prepend your registry URL in front of this string as shown.
    docker tag flexera/lwk:a.b.c registry.example.org/flexera/lwk:a.b.c
  9. Ensure that you are logged into your OCI container registry, using an account with administrative privileges.
  10. Push the image for lightweight Kubernetes agent to your registry:
    docker push registry.example.org/flexera/lwk:a.b.c
  11. Inspect the YAML documents (supplied in the install directory) that are applied during installation and modify the Deployment.
    All of the RBAC resources that the lightweight Kubernetes agent uses are contained within the rbac.yaml file. You may also want to inspect the default deployment.yaml file (particularly if you plan to complete a manual installation process).
  12. Choose between:
    • Scripted installation — This can automate the configuration of YAML resources without manual editing. Allows previewing (and optionally saving) the configuration before applying it. Requires the kubectl tool present on your working device when applying the resources to the cluster. For details, see Scripted Installation.
    • Manual installation — Requires that you manually edit the deployment.yaml file, and then apply all required resources to the cluster (also using the kubectl tool). For details, see Manual Installation.

Whichever process you choose, the installation creates the following resources in the cluster.

Namespace flexera
apiVersion: v1
kind: Namespace
metadata:
  name: flexera
ServiceAccount flexera/lwk
apiVersion: v1
kind: ServiceAccount
metadata:
  name: lwk
  namespace: flexera
ClusterRole flexera-lwk
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: flexera-lwk
ClusterRoleBinding flexera-lwk
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: flexera-lwk
Deployment flexera/lwk
apiVersion: apps/v1
kind: Deployment
metadata:
  name: lwk
  namespace: flexera

FlexNet Manager Suite (On-Premises)

2022 R1