Skip to content

Kubescape Sizing Checker analyzes your Kubernetes cluster's resources and generates recommended Helm values to ensure Kubescape operator runs smoothly and efficiently

License

Notifications You must be signed in to change notification settings

kubescape/sizing-checker

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

  1. 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.
  1. Deploy the Kubernetes manifest:

    Apply the Kubernetes manifest to set up the necessary resources:

    kubectl apply -f k8s-manifest.yaml
  2. Verify Job Completion:

    Check the status and logs of the Job:

    kubectl wait -n kubescape-prerequisite --for=condition=complete job/kubescape-prerequisite --timeout=60s
    kubectl logs -n kubescape-prerequisite job/kubescape-prerequisite
  3. Export the Files:

    Retrieve the recommended-values.yaml and prerequisites-report.html from the ConfigMap:

    kubectl get -n kubescape-prerequisite configmap kubescape-prerequisites-report -n default -o go-template='{{ index .data "recommended-values.yaml" }}' > recommended-values.yaml
    kubectl get -n kubescape-prerequisite configmap kubescape-prerequisites-report -n default -o go-template='{{ index .data "prerequisites-report.html" }}' > prerequisites-report.html
  4. Clean Up Resources After extracting the necessary files, remove the deployed resources to free up cluster space:

    kubectl delete -f k8s-manifest.yaml

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.
------------------------------------------------------------

Report example

alt text

About

Kubescape Sizing Checker analyzes your Kubernetes cluster's resources and generates recommended Helm values to ensure Kubescape operator runs smoothly and efficiently

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •