By default, the Flexera Kubernetes Resource Management (KRM) Agent installs into the flexera namespace. However, some organizations have policies that prohibit the use of generic or predefined namespaces.
This article explains how to modify the KRM Agent installation to use a custom namespace in your Kubernetes cluster.
What the install script creates by default
When run without modifications, the install script (install.sh) creates the following resources in the flexera namespace:
- A
krms.agents.flexera.comCustomResourceDefinition - The
flexeranamespace - A
ServiceAccountin theflexeranamespace for the controller - A
ServiceAccountin theflexeranamespace for the Flexera Kubernetes inventory agent - A
ClusterRolethat defines the permissions needed by the controller, and aClusterRoleBindingto associate thatClusterRolewith the controller'sServiceAccount - A
ClusterRolethat defines the required permissions by the Flexera Kubernetes inventory agent ClusterRoleBindingsassociate the agentClusterRoleand the built-inviewClusterRolewith the agent'sServiceAccount- A
Deploymentof the controller application in theflexeranamespace
To install the KRM Agent in a custom namespace, you’ll need to make manual changes before running the script.
Step 1: Modify install.sh
- Open the following file in a text editor such as vi or nano:
krm-<version>/install.sh
- Locate this line:
$KUBECTL rollout status -w -n flexera deployments/krm-controller;
- Replace
flexerawith your custom namespace:
$KUBECTL rollout status -w -n <your-namespace> deployments/krm-controller;
Step 2: Update namespace references in configuration files
Edit the following files to replace all instances of:
namespace: flexera
with
namespace: <your-namespace>
Files to update:
krm-<version>/config/rbac/controller_clusterrolebindings.yamlkrm-<version>/config/rbac/agent_clusterrolebindings.yamlkrm-<version>/config/pre1.16/kustomization.yamlkrm-<version>/config/openshift/clusterrolebinding.yamlkrm-<version>/config/namespace/namespace.yamlkrm-<version>/config/ibm-licensing-rbac/clusterrolebinding.yamlkrm-<version>/config/ibm-licensing/clusterrolebinding.yamlkrm-<version>/config/default/kustomization.yamlkrm-<version>/config/collect-storage/clusterrolebinding.yaml
Step 3: Run the install script
After making the edits above, run the modified install.sh script. This will:
- Create your custom namespace
- Deploy the controller and agent components into that namespace
- Use your defined namespace for
ServiceAccountsand bindings
Step 4: Add namespace to your KRM YAML
If you're deploying a KRM.yaml file afterward, add the following under the spec section to ensure the deployment references your custom namespace:
namespace: <your-namespace>
Apply the file using:
kubectl apply -f KRM.yaml
Step 5: Verify deployment
To confirm that the KRM Agent is running in your custom namespace, run:
kubectl get pods -n <your-namespace>
Related Articles
Deploy the KRM Agent using Flexera’s public AWS ECR image 7Number of Views Helm chart file krm-chart/templates/flexera-krm.yaml is missing the "namespace" configuration option 4Number of Views Certificate revocation issues while using the Flexera Kubernetes inventory agent 17Number of Views Using a Service Account with the Flexera One API 66Number of Views Fix "ndtrack.exe is not marked for installation" error when installing the FlexNet Inventory Agent on Windows 43Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago