Skip to main content
In this guide, you’ll learn how to deploy OctarineSec KubeScan to continuously assess and monitor Kubernetes workloads. KubeScan computes a risk score between 0 (no risk) and 10 (high risk) for each workload based on configurable runtime rules.
The image shows a GitHub repository page for "kube-scan" by "octarinesec," displaying files, commit history, and repository details. The page includes options to view code, issues, pull requests, and more.

Prerequisites

  • A Kubernetes cluster (v1.16+)
  • kubectl configured for your cluster
  • Docker CLI for building and pushing images
  • Git for cloning the repository

1. Clone & Build

Since the official images might not be publicly pullable, clone the source and build both UI and server components:

2. Configure Risk Scoring

Open kube-scan.yaml and locate the ConfigMap under the kube-scan namespace. Adjust thresholds or add rules to match your security policy:
You can extend basic or create new rule sets for network, resource limits, or Pod security policies.

3. Deploy KubeScan

Update the Deployment spec in kube-scan.yaml to use your built images:
Apply the complete manifest:

4. Expose the UI Service

By default, the UI Service is ClusterIP. To access it externally, switch to LoadBalancer or NodePort:
Reapply and get the external endpoint:

5. Access the Dashboard

Open your browser at http://<HOST>:<PORT>. The K8S Risk Assessment dashboard displays all workloads with their risk scores.
The image shows a "K8S Risk Assessment" dashboard from a tool called "KUBE-SCAN," displaying a list of deployments with associated risk levels and namespaces.

6. Workload Risk Comparison

Compare two deployments of the same DevSecOps application:

Default Deployment (Higher Risk)

Production Deployment (Lower Risk)

The image shows a K8S Risk Assessment dashboard with a medium risk score of 5, highlighting issues related to CPU or memory limits not being configured for a workload. It provides details on availability impact, exploitability, and recommendations.

7. System Namespace Pods

Enable “Show system pods” to include core components (e.g., grafana, prometheus) in the assessment.
The image shows a "K8S Risk Assessment" dashboard from a kube-scan application, listing various Kubernetes deployments and their associated risk levels. The interface includes columns for risk, name, kind, and namespace.

8. Risky Nginx Pod Demo

Create a deliberately risky Pod and Service in both default and prod namespaces:
Apply and force an immediate scan:
  • In default, nginx-risky-pod scores 7 (High) due to hostPath, ALL capabilities, missing limits, and LoadBalancer exposure.
  • In prod with an Istio sidecar, the score drops to 6 (Medium) thanks to service-mesh encryption and identity features.
The image shows a K8S Risk Assessment dashboard from Kube-Scan, highlighting a high-risk issue with an "nginx-risky-pod" due to exposure through a load balancer. It details the potential impacts on integrity, confidentiality, and availability, with a moderate likelihood of exploitation.
The image shows a K8S Risk Assessment dashboard for a Kubernetes pod named "nginx-risky-pod" with a medium risk score of 6. It includes details about confidentiality and availability impacts, and mentions service meshes like Istio and Octarine for network security.

Conclusion

KubeScan provides an automated scoring engine to surface misconfigurations and risk hotspots. By reviewing scores and iteratively adding Pod security contexts, resource constraints, or service meshes, you can drive your cluster toward a more secure posture.

Watch Video