Learn about the installation process for KubeLedger on Kubernetes and OpenShift.
Requirements
KubeLedger requires read-only access to the following Kubernetes API endpoints:
/api/v1/apis/metrics.k8s.io/v1beta1(provided by the Kubernetes Metrics Server)
Installing Kubernetes Metrics Server (Skip if using OpenShift)
OpenShift includes the Metrics Server by default. For other Kubernetes distributions, install it with:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
Deployment Methods
KubeLedger can be installed using one of the following methods:
Cloning the Deployment Artifacts
Clone the repository and navigate to the main folder:
git clone https://github.com/realopslabs/kubeledger.git --depth=1
cd kubeledger
Installing with Kustomize (Default Settings)
This approach provides a quick way to deploy KubeLedger using default settings. Review the Kustomize resources in ./manifests/kubeledger/kustomize/resources/.
For advanced customization, use the Helm-based installation instead.
Default Settings
- Persistent volume with
1Gistorage request - Standard Kubernetes (not OpenShift)
- Pod runs with UID
4583and GID4583
Installation Steps
# Create the namespace
kubectl create ns kubeledger
# Deploy KubeLedger
kubectl -n kubeledger apply -k ./manifests/kubeledger/kustomize
# Wait for the pod to start
kubectl -n kubeledger get po -w
# If no pod appears, check events
kubectl -n kubeledger get ev
Customizing the Installation with Helm
This approach is recommended for OpenShift deployments or when advanced configuration is required.
Customize the installation by editing ./manifests/kubeledger/helm/values.yaml.
Common Customizations
| Setting | Description |
|---|---|
.dataVolume.persist: false | Use emptyDir for local testing |
.dataVolume.persist: true | Use persistent volume (default) |
.dataVolume.capacity | Persistent volume size (default: 1Gi) |
.dataVolume.storageClass | Storage class name (uses cluster default if unset) |
.securityContext.openshift: true | Enable OpenShift mode (binds nonroot-v2 SCC) |
.dcgm.enable: true | Enable DCGM integration for GPU monitoring |
.dcgm.endpoint | DCGM metrics endpoint URL (e.g., http://dcgm-exporter.gpu-operator.svc:9400/metrics) |
.resources.requests.cpu | CPU request |
.resources.requests.memory | Memory request |
.envs | Environment variables (see Configuration Settings) |
Installation Steps
# Create the namespace
kubectl create ns kubeledger
# Deploy KubeLedger
helm upgrade -n kubeledger --install kubeledger ./manifests/kubeledger/helm/
# Wait for the pod to start
kubectl -n kubeledger get po -w
# If no pod appears, check events
kubectl -n kubeledger get ev
Accessing the Web Interface
The deployment creates an HTTP service named kubeledger on port 80 in the installation namespace. This service provides access to the KubeLedger dashboard.
