Skip to content

Installing Icinga for Kubernetes on Ubuntu

The recommended way to install Icinga for Kubernetes is to use prebuilt packages from our official release repository. If the repository is not configured yet, please add it first before installing the package.

All packages we provide are signed with the following key.

Adding Icinga Package Repository

Here’s how to add the official release repository:

apt update
apt -y install apt-transport-https wget gnupg

install -d -o root -g root -m 0755 /etc/apt/keyrings

wget -O - https://packages.icinga.com/icinga.key | gpg --dearmor -o /etc/apt/keyrings/icinga.gpg

. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \
 echo "deb [signed-by=/etc/apt/keyrings/icinga.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" > \
 /etc/apt/sources.list.d/${DIST}-icinga.list
 echo "deb-src [signed-by=/etc/apt/keyrings/icinga.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \
 /etc/apt/sources.list.d/${DIST}-icinga.list

apt update

Installing the Package

Use your distribution’s package manager to install the icinga-kubernetes package as follows:

apt install icinga-kubernetes

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. You can also import the schema file manually, which is located at /usr/share/kubernetes/schema/mysql/schema.sql.

Configuring Icinga for Kubernetes

Icinga for Kubernetes installs its configuration file to /etc/icinga-kubernetes/config.yml, pre-populating most of the settings for a local setup. Before running Icinga for Kubernetes, 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

The icinga-kubernetes package automatically installs the necessary systemd unit files to run Icinga for Kubernetes. Please run the following command to enable and start its service:

systemctl enable --now icinga-kubernetes

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.