Skip to content

Installing Icinga for Kubernetes from Source

Using go install

You can build and install icinga-kubernetes as follows:

go install github.com/icinga/icinga-kubernetes@latest

This should place the icinga-kubernetes binary in your configured $GOBIN path which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH environment variable is not set.

Build from Source

Download or clone the source and run the following command from the source’s root directory.

go build -o icinga-kubernetes cmd/icinga-kubernetes/main.go

Setting up the Database

A MySQL (≥5.5) or MariaDB (≥10.1) database is required to run Icinga for Kubernetes. Please follow the steps listed for your target database, which guide you through setting up the database and user, and importing the schema.

Setting up a MySQL or MariaDB Database

If you use a version of MySQL < 5.7 or MariaDB < 10.2, the following server options must be set:

innodb_file_format=barracuda
innodb_file_per_table=1
innodb_large_prefix=1

Set up a MySQL database for Icinga for Kubernetes:

CREATE DATABASE kubernetes;
CREATE USER 'kubernetes'@'localhost' IDENTIFIED BY 'CHANGEME';
GRANT ALL ON kubernetes.* TO 'kubernetes'@'localhost';

Icinga for Kubernetes automatically imports the schema on first start and also applies schema migrations if required.

Configuring Icinga for Kubernetes

Before running Icinga for Kubernetes, create a local config.yml using the sample configuration adjust the database credentials and, if necessary, the connection configuration. The configuration file explains general settings. All available settings can be found under Configuration.

Running Icinga for Kubernetes

With locally accessible kubeconfig and config.yml files, icinga-kubernetes can be executed by running:

icinga-kubernetes -config /path/to/config.yml

Using a Container

With locally accessible kubeconfig and config.yml files, run the icinga/icinga-kubernetes image using a container runtime of you choice, e.g. Docker:

export KUBECONFIG=$HOME/.kube/config
export ICINGA_KUBERNETES_CONFIG=config.yml
docker run --rm -v $ICINGA_KUBERNETES_CONFIG:/config.yml -v $KUBECONFIG:/.kube/config icinga/icinga-kubernetes:edge

Running Within Kubernetes

Before running Icinga for Kubernetes inside Kubernetes, create a local configuration using the sample configuration adjust the database credentials and, if necessary, the connection configuration. The sample configuration explains general settings. All available settings can be found under Configuration.

You can also use our Helm charts to provide a ready-to-use Icinga stack.

Installing Icinga for Kubernetes Web

With Icinga for Kubernetes and the database fully set up, you have completed the instructions here and can proceed to installing Icinga for Kubernetes Web which connects to the database to display and work with the monitoring data.