Why Kubernetes?
Kubernetes is a container orchestration tool that helps you manage deployments using declarative configuration files called manifests. Kubernetes provides a standardized way of achieving the following:- High availability
- Disaster recovery
- Scalability
Relevant Kubernetes Resources
If you’re new to Kubernetes, here are some starting resources to get you up to speed:- Kubernetes Documentation
- Kubernetes Basics
- Kubernetes Networking Concepts
- Persistent Volumes in Kubernetes
- Kubernetes from Zero to Hero
Managed Kubernetes Services
Managed Kubernetes services, offered by major cloud providers, can simplify deployment and maintenance. Benefits include:- Easier deployment and scaling
- Automated control plane maintenance
- Built-in health monitoring and repairs
- Amazon Elastic Kubernetes Service (EKS)
- Google Kubernetes Engine (GKE) [^1]
- Microsoft Azure Kubernetes Service (AKS)
Bare-Metal Kubernetes
Deploying on bare-metal environments offers:- Complete control over the entire stack
- Ability to fine-tune configurations
- Potential cost savings for large-scale deployments
Kubernetes Distributions
There are many distributions available to install Kubernetes. For self-hosted options, we recommend two for their simplicity and sane default settings: But also, more enterprise-ready options are fine too:Kubernetes Cluster Considerations
While this guide focuses on worker node specifications, it’s important to note that a functional Kubernetes cluster also requires properly configured master nodes (known as the Control Plane). The requirements for master nodes can vary significantly depending on:- The size of your cluster
- Your chosen Kubernetes distribution
- High availability requirements
- The specific needs of your environment
Local Testing
For local testing purpose, we recommend using: Both tools allow you to run Kubernetes clusters on your local machine, which is perfect for testing and familiarizing yourself with Binarly On-Prem before deploying to a production environment. [^1]: Our test cluster in Google Cloud Platform (GCP) uses c3-standard-8 instances (8 vCPUs, 32 GB memory) for worker nodes, which has shown good performance for testing purposes. Your specific requirements may vary based on your workload and scale.Hardware Requirements
For Binarly On-Prem, here are our recommended specifications for Kubernetes Worker Nodes:
The Binarly Scanner is the component with the highest demands in terms of memory and CPU. We recommend allocating the resources in the table above, but scanner requirements can vary hugely between different image types.
Kubernetes Requirements
Binarly On-Prem requires a Kubernetes cluster with the following components:- A Storage Class for Persistent Volumes
- An Ingress Controller
- A route to the cluster
- A domain
- Three subdomain names for the components (The names can be customised):
- Dashboard (Main application)
- Keycloak (Authentication)
- Minio (Object Storage)
- Certificates for the domain names
Scanner Requirements
The scanning tools run as Kubernetes Jobs on the system and will ideally be run on a separate node group. These jobs run in parallel and therefore can be resource intensive, depending on the subject of the scan.Parallel Scans
The Scanner deployment will run as many scans in parallel as there are Scanner pods. This is controlled usingreplicas in the values file:
Scan Resource Requests
The Binarly scan is made up of multiple seperate jobs that run in parallel. The resources are set in the values file and are shown here with the default values:Setting Up Job Distribution
The Jobs accept common Kubernetes configuration to spread the load across the cluster:Scanner Storage Requirements
By default, each scan job requests 80GB of storage. This is configurable in the values file:Data Requirements
Binarly On-Prem requires a persistent storage backend comprising of PostgreSQL Databases and Object Storage. We recommend deploying these outside of the Binarly On-Prem cluster for better performance and reliability, but can deploy these as part of the installation. For object storage, we support:- Amazon S3
- Google Cloud Storage
- MinIO
Using the Built-in Data System
Binarly On-Prem includes a built-in data plane for small-scale deployments. This data plane is suitable for testing and evaluation purposes, but we recommend using external storage for production deployments.The Storage Size is dependent on the number of scans and the size of the images being scanned. The above values are a starting point and should be adjusted based on your specific requirements.
Using External Data Systems
Details can be injected into the Binarly deployments using secrets in the deployment namespace. The secrets are passed to each component using the following values:Databases
-
Server:
-
VDB:
-
Keycloak:
Object Storage
Object storage is used to:- Host the files used for vulnerability discovery
- Store images and other artifacts
AWS S3
There needs to be a secret calledartefacts-bucket-credentials with the following keys:
GCS
There needs to be a secret calledartefacts-bucket-credentials with the following keys:
- objectViewer
- objectUser
- objectCreator