Build Overview
The Kubernetes Dashboard uses a modular build system with multiple make targets for different build scenarios. All builds are orchestrated through the rootMakefile.
Make Targets
The project provides several make targets for building different components:Primary Build Commands
Build Command Details
make build
make build
Builds all modules in the
modules directory.What it does:- Ensures all required tools are installed
- Cleans up temporary directories
- Runs build targets for all modules
make image
make image
Creates Docker images for all modules locally.What it does:Skip Build:
- Builds production-ready Docker images
- Uses Docker Compose to build all services
- Tags images with version
v0.0.0-prod
make clean
make clean
Cleans up all temporary directories and build artifacts.What it does:
- Removes temporary directories
- Cleans build artifacts across all modules
Building Docker Images
Local Development Images
For local development, Docker images are built automatically when you run:Manual Image Building
To build Docker images manually without starting services:dashboard-auth- Authentication moduledashboard-api- API moduledashboard-web- Web frontenddashboard-scraper- Metrics scraper
Image Build Configuration
Images are built using Docker Compose with the following settings:- Version tag:
v0.0.0-prod - Architecture: Defaults to system architecture (can be overridden with
ARCHvariable) - Build cache: Use
--no-cacheflag for clean builds
Building for Helm
For deploying to a local Kubernetes cluster using Helm:- Ensures a kind cluster is running
- Installs ingress-nginx for kind
- Updates Helm dependencies
- Builds all production-ready Docker images
- Loads built images into the kind cluster
- Installs Kubernetes Dashboard via Helm chart
Skip Building Images
If you already have images built and just want to install the Helm chart:Module-Specific Builds
The build system supports module-specific operations:API Module
The API module is built as part of the global build process. It includes:- Go compilation
- Binary creation
- Docker image building
Web Module
The web module uses Angular and includes:- TypeScript compilation
- Asset optimization
- Production bundle creation
Metrics Scraper
The metrics scraper is built as a Go binary and packaged into a Docker image.Schema Generation
If you modify API schemas or GraphQL definitions, regenerate schemas:- API module
- Web module
Build Verification
After building, verify the build was successful:Check Docker Images
dashboard-auth:latestdashboard-api:latestdashboard-web:latestdashboard-scraper:latest
Run Health Checks
Start the production build and verify all services are healthy:- http://localhost:8080 (HTTP)
- https://localhost:8443 (HTTPS)
Build Options
Environment Variables
The build system supports several environment variables:| Variable | Description | Default |
|---|---|---|
ARCH | Target architecture | System architecture |
VERSION | Version tag for images | v0.0.0-prod |
NO_BUILD | Skip building images | false |
SYSTEM_BANNER | Custom banner text | Empty |
SYSTEM_BANNER_SEVERITY | Banner severity level | Empty |
Example: Build for Different Architecture
Troubleshooting
Build Failures
If builds fail, try:-
Clean and rebuild:
-
Ensure tools are installed:
-
Check Docker is running:
Cache Issues
For cache-related issues, rebuild images without cache:Next Steps
Testing
Learn how to run tests and ensure code quality
Contributing
Learn how to contribute your changes