Installation on Kubernetes and OpenShift

Learn about the installation process for KubeLedger on Kubernetes and OpenShift.

Requirements

KubeLedger requires read-only access to the following Kubernetes API endpoints:

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:

  • Kustomize – Quick installation with default settings
  • Helm – Advanced customization

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 1Gi storage request
  • Standard Kubernetes (not OpenShift)
  • Pod runs with UID 4583 and GID 4583

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

SettingDescription
.dataVolume.persist: falseUse emptyDir for local testing
.dataVolume.persist: trueUse persistent volume (default)
.dataVolume.capacityPersistent volume size (default: 1Gi)
.dataVolume.storageClassStorage class name (uses cluster default if unset)
.securityContext.openshift: trueEnable OpenShift mode (binds nonroot-v2 SCC)
.dcgm.enable: trueEnable DCGM integration for GPU monitoring
.dcgm.endpointDCGM metrics endpoint URL (e.g., http://dcgm-exporter.gpu-operator.svc:9400/metrics)
.resources.requests.cpuCPU request
.resources.requests.memoryMemory request
.envsEnvironment 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.