Difficulty: Beginner
Estimated Time: 10 minutes

In this tutorial we will be installing InfluxDB inside Kubernetes using StorageOS volumes. InfluxDB is a time series database that is optimised for managing datasets consisting of many small measurements. Its advantages include the ability to handle very high write and query loads. Its uses include monitoring, analytics and the recording and analysis of data from sensors. It is a highly suitable workload to run on StorageOS.

In the stages that follow, we will create a host pod to serve InfluxDB requests, and a client pod with which to interact with the host. The scenario draws inspiration from our use case in the StorageOS documentation. The YAML source files available in the environment are identical to those in the github repository that is checked out as part of the use case.

This sandbox environment is a fully configured 3-node Kubernetes cluster with StorageOS installed at runtime. Please wait for the initialisation to complete before attempting to begin the tutorial - this will take a few minutes.

InfluxDB

Step 1 of 3

Introduction and Setup Environment

This tutorial requires Kubernetes and StorageOS to be installed. When the installation is complete, you will see the text "StorageOS is ready on hostX".

To verify the installation, run the following command and ensure all pods are ready.

kubectl -n kube-system get pods -lapp=storageos

Now we are ready to access the StorageOS CLI. We can use a use a pod for this interaction.

Install the StorageOS CLI in a pod using this command:

kubectl -n kube-system run \ --image storageos/cli:v2.2.0 \ --restart=Never \ --env STORAGEOS_ENDPOINTS=[[HOST2_IP]]:5705 \ --env STORAGEOS_USERNAME=storageos \ --env STORAGEOS_PASSWORD=storageos \ --command cli \ -- /bin/sh -c "while true; do sleep 999999; done"

To ensure that the CLI pod has been created successfully, we can use the following command. Look for the CLI to become "ready" (use Ctrl + C to exit).

kubectl -n kube-system get pods -l run=cli -w

You can use the CLI pod to inspect the StorageOS installation. Exec into the CLI pod and get the nodes in the kube-system namespace.

kubectl exec -ti cli -n kube-system -- storageos get node

You now have a succesful and healthy StorageOS installation running on a Kubernetes cluster. In the next step we will install InfluxDB.