Kubescape Sizing Checker analyzes your Kubernetes cluster's resources and generates recommended Helm values to ensure Kubescape runs smoothly and efficiently.
- Kubeconfig configured for access to the Kubernetes cluster where you plan to deploy Kubescape Operator.
There are two ways to run the check:
- Navigate to the command directory and Execute the program:
cd /cmd go run .
- 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-sizing-checker --timeout=60s kubectl logs job/kubescape-sizing-checker
-
Export the Files:
Retrieve the
recommended-values.yaml
andsizing-report.html
from the ConfigMap:kubectl get configmap kubescape-sizing-report -n default -o go-template='{{ index .data "recommended-values.yaml" }}' > recommended-values.yaml kubectl get configmap kubescape-sizing-report -n default -o go-template='{{ index .data "sizing-report.html" }}' > sizing-report.html
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]
If you want to review the sizing report, open the HTML file:
Open in Browser:
- macOS:
open sizing-report.html
- Linux:
xdg-open sizing-report.html
- Windows (Git Bash):
start sizing-report.html
```------------------------------------------------------------
✅ Sizing report generated locally!
• /tmp/sizing-report.html (HTML report)
• /tmp/recommended-values.yaml (Helm values file)
📋 Open /tmp/sizing-report.html in your browser for details.
🚀 Use the generated recommended-values.yaml to optimize Kubescape for your cluster.
------------------------------------------------------------
```
```sh
kubectl logs job/kubescape-sizing-checker
```
```------------------------------------------------------------
✅ Sizing report stored in Kubernetes ConfigMap!
• ConfigMap Name: sizing-report
• Namespace: default
------------------------------------------------------------
⬇️ To export the report and recommended values to local files, run the following commands:
kubectl get configmap kubescape-sizing-report -n default -o go-template='{{ index .data "sizing-report.html" }}' > sizing-report.html
kubectl get configmap kubescape-sizing-report -n default -o go-template='{{ index .data "recommended-values.yaml" }}' > recommended-values.yaml
📋 Open sizing-report.html in your browser for details.
🚀 Use the generated recommended-values.yaml to optimize Kubescape for your cluster.
------------------------------------------------------------
```