Skip to content

Kubernetes Operator to handle cross-site, cross-distribution & multi-Kubernetes usage tracking, analytics and accounting (vanilla Kubernetes, OpenShift, EKS, AKS, GKE and other distros).

License

Notifications You must be signed in to change notification settings

2-alchemists/krossboard-kubernetes-operator

Repository files navigation

lint license


What is Krossboard Kubernetes Operator

Krossboard is a multi-cluster and cross-distribution Kubernetes usage accounting and analytics software.

Learn more about Krossboard Features

Krossboard Kubernetes Operator provides custom resources (CR) along with an operator to deploy and manage instances of Krossboard as Kubernetes pods.

The Krossboard CR defines a Krossboard instance as a Kind, as well as parameters to bootstrap that instance: krossboard-api, krossboard-ui, krossboard-consolidator, krossboard-kubeconfig-handler, kube-opex-analytics instances.

Each instance of Krossboard enables to track the usage of a set of Kubernetes clusters listed in a KUBECONFIG secret.

The next steps describe how to deploy the operator and a Krossboard instance.

Deploy Krossboard Kubernetes Operator

The following command deploy the latest version of Krossboard Operator.

kubectl apply -f https://raw.githubusercontent.com/2-alchemists/krossboard-kubernetes-operator/main/config/releases/latest/krossboard/krossboard-kubernetes-operator.yaml

The installation is achieved in a namespace named krossboard.

Deploy a Krossboard Instance

Create a Krossboard CR

Once the operator deployed, a custom resource named Krossboard is created. This CR is used to define each instance of Krossboard.

See krossboard.yaml for an example to a Krossboard instance along with its persistent volume claim.

---
apiVersion: krossboard.krossboard.app/v1alpha1
kind: Krossboard
metadata:
  name: krossboard
  namespace: krossboard
spec:
  koaImage: rchakode/kube-opex-analytics:24.03.3
  krossboardDataProcessorImage: krossboard/krossboard-data-processor:1.3.0
  krossboardUIImage: krossboard/krossboard-ui:1.2.2-d49718c
  krossboardPersistentVolumeClaim: krossboard-data-pvc
  krossboardSecretName: krossboard-secrets
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: krossboard-data-pvc
  namespace: krossboard
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
#  storageClassName: uncomment-and-set-if-not-using-default

Each instance of Krossboard allows to track the usage of a set of Kubernetes clusters listed in a KUBECONFIG secret.

  • The secret name is set by the parameter krossboardSecretName (default is krossboard-secrets).
  • The secret key is kubeconfig.

Create a KUBECONFIG secret for target Kubernetes

Given a KUBECONFIG resource (/path/to/kubeconfig in the below command), you can create a secret for Krossboard Operator as follows.

kubectl -n krossboard \
    create secret --type=Opaque generic krossboard-secrets \
    --from-file=kubeconfig=/path/to/kubeconfig

Start the Krossboard Instance

The below command deploys an instance of Krossboard based on the latest version.

kubectl -n krossboard apply -f https://raw.githubusercontent.com/2-alchemists/krossboard-kubernetes-operator/main/config/releases/latest/krossboard/krossboard-deployment.yaml

Once started, the instance enables access to two Kubernetes services:

  • krossboard-ui.krossboard.svc enabling access to Krossboard UI.
  • krossboard-api.krossboard.svc enabling access to Krossboard REST API.

Day2 Operations

About

Kubernetes Operator to handle cross-site, cross-distribution & multi-Kubernetes usage tracking, analytics and accounting (vanilla Kubernetes, OpenShift, EKS, AKS, GKE and other distros).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published