repository
0.0.0-20250214150700-f76039e53ac3
Repository: https://github.com/kubescape/sizing-checker.git
Documentation: pkg.go.dev
# README
Kubescape Prerequisites Checker
Overview
Kubescape Prerequisites Checker analyzes your Kubernetes cluster and generates recommended Helm values to ensure Kubescape runs smoothly and efficiently.
Prerequisites
- Kubeconfig configured for access to the Kubernetes cluster where you plan to deploy Armo.
Run the Check
There are two ways to run the check:
Option 1 - Local Run
- Navigate to the command directory and Execute the program:
git clone https://github.com/kubescape/sizing-checker.git cd sizing-checker/ go run ./cmd/checker
Option 2 - In-cluster Run
Prerequisites
- Permissions to create ServiceAccounts, ClusterRoles, ClusterRoleBindings, and Jobs.
-
Deploy the Kubernetes manifest:
Apply the Kubernetes manifest to set up the necessary resources:
kubectl apply -f k8s-manifest.yaml
-
Verify Job Completion:
Check the status and logs of the Job:
kubectl wait --for=condition=complete job/kubescape-prerequisite --timeout=60s kubectl logs job/kubescape-prerequisite
-
Export the Files:
Retrieve the
recommended-values.yaml
andprerequisites-report.html
from the ConfigMap:kubectl get configmap kubescape-prerequisites-report -n default -o go-template='{{ index .data "recommended-values.yaml" }}' > recommended-values.yaml kubectl get configmap kubescape-prerequisites-report -n default -o go-template='{{ index .data "prerequisites-report.html" }}' > prerequisites-report.html
Usage
Deploy Kubescape with Recommended Resources
Use Helm to deploy Kubescape using the recommended values:
helm upgrade --install kubescape kubescape/kubescape-operator \
--namespace kubescape --create-namespace \
--values recommended-values.yaml [other parameters]
View the Prerequisites Report
If you want to review the prerequisites report, open the HTML file:
Open in Browser:
- macOS:
open prerequisites-report.html
- Linux:
xdg-open prerequisites-report.html
- Windows (Git Bash):
start prerequisites-report.html
Output
Local Run
ā
Prerequisites report generated locally!
⢠/tmp/prerequisites-report.html (HTML report)
⢠/tmp/recommended-values.yaml (Helm values file)
š Open /tmp/prerequisites-report.html in your browser for details.
š Use the generated recommended-values.yaml to optimize Kubescape for your cluster.
------------------------------------------------------------
In-cluster Run
kubectl logs job/kubescape-prerequisite
ā
Prerequisites report stored in Kubernetes ConfigMap!
⢠ConfigMap Name: prerequisites-report
⢠Namespace: default
------------------------------------------------------------
ā¬ļø To export the report and recommended values to local files, run the following commands:
kubectl get configmap kubescape-prerequisites-report -n default -o go-template='{{ index .data "prerequisites-report.html" }}' > prerequisites-report.html
kubectl get configmap kubescape-prerequisites-report -n default -o go-template='{{ index .data "recommended-values.yaml" }}' > recommended-values.yaml
š Open prerequisites-report.html in your browser for details.
š Use the generated recommended-values.yaml to optimize Kubescape for your cluster.
------------------------------------------------------------