Skip to content

Using custom Plugins

When you want to use custom plugins, e.g. a community plugins or a private plugin, you have to build your own Docker image for kobs. For this we are providing a template repository which can be found at

To use this template you can use the Use this template button from the repository to create your own version of kobs.

Add a Plugin

To add a plugin to your version of kobs your have to adjust the main.go and the Dockerfile.


The main.go file is used to register the plugin in the backend code. To do this you just have to import the Go package of the plugin and add it to the pluginMounts map. You can also remove once of the plugins which are comming with kobs if you do not need them. In the following example we are adding the helloworld plugin from the kobsio/plugin-template repository and removing the rss plugin, because we do not want to use it:

package main

import (

    azure ""
    elasticsearch ""
    flux ""
    grafana ""
    harbor ""
    helm ""
    istio ""
    jaeger ""
    kiali ""
    klogs ""
    opsgenie ""
    prometheus ""
-    rss ""
    sonarqube ""
    sql ""
    techdocs ""

+    helloworld ""


func main() {
    var pluginMounts map[string]plugin.MountFn
    pluginMounts = make(map[string]plugin.MountFn)

    pluginMounts[azure.PluginType] = azure.Mount
    pluginMounts[elasticsearch.PluginType] = elasticsearch.Mount
    pluginMounts[flux.PluginType] = flux.Mount
    pluginMounts[grafana.PluginType] = grafana.Mount
    pluginMounts[harbor.PluginType] = harbor.Mount
    pluginMounts[helm.PluginType] = helm.Mount
    pluginMounts[istio.PluginType] = istio.Mount
    pluginMounts[jaeger.PluginType] = jaeger.Mount
    pluginMounts[kiali.PluginType] = kiali.Mount
    pluginMounts[klogs.PluginType] = klogs.Mount
    pluginMounts[opsgenie.PluginType] = opsgenie.Mount
    pluginMounts[prometheus.PluginType] = prometheus.Mount
-    pluginMounts[rss.PluginType] = rss.Mount
    pluginMounts[sonarqube.PluginType] = sonarqube.Mount
    pluginMounts[sql.PluginType] = sql.Mount
    pluginMounts[techdocs.PluginType] = techdocs.Mount

+    pluginMounts[helloworld.PluginType] = helloworld.Mount

    if err := root.Command(pluginMounts).Execute(); err != nil {
        log.Fatal(nil, "Failed to initialize kobs", zap.Error(err))

When you have adjusted the main.go file run go mod tidy to add it to your go.mod file.


The Dockerfile is used to build your own version of kobs and to copy the frontend files for your plugin. We are using again the helloworld plugin from the kobsio/plugin-template in the following example:

FROM kobsio/kobs:v0.11.0 as app
+FROM kobsio/plugin:main as plugin-helloworld

FROM golang:1.19.0 as api
COPY go.mod go.sum /kobs/
RUN go mod download
COPY . .
RUN export CGO_ENABLED=0 && make build

FROM alpine:3.16.2
RUN apk update && apk add --no-cache ca-certificates
RUN mkdir /kobs
COPY --from=api /kobs/bin/kobs /kobs
COPY --from=app /kobs/app /kobs/app
+COPY --from=plugin-helloworld /kobs/helloworld /kobs/app/plugins/helloworld
USER nobody
ENTRYPOINT  [ "/kobs/kobs" ]

The created Docker image can then be used within the Helm chart or Kustomize files from the documentation.