Skip to main content

Installation

Installation on Kubernetes​

The Bleemeo agent supports discovering services running on Kubernetes. It will monitor all known services and gather Docker containers metrics.

The agent can be installed using kubectl or using Helm.

Installation with kubectl​

To monitor your services, an access to the Kubernetes API is required. The easiest is to run the agent in the Kubernetes cluster using a DaemonSet. You should use the deployment yaml provided, you only need to change GLOUTON_BLEEMEO_ACCOUNT_ID, GLOUTON_BLEEMEO_REGISTRATION_KEY and GLOUTON_KUBERNETES_CLUSTERNAME.

The GLOUTON_KUBERNETES_CLUSTERNAME is used by the Bleemeo agents to know they belong to the same cluster, so this value need to be unique for each Kubernetes cluster you have.

The following use envsubst (should be available on all Linux) to automatically replace the values:

export GLOUTON_BLEEMEO_ACCOUNT_ID=<YOUR-ACCOUNT-ID>
export GLOUTON_BLEEMEO_REGISTRATION_KEY=<YOUR-REGISTRATION-KEY>
export GLOUTON_KUBERNETES_CLUSTERNAME="my_k8s_cluster_name"
curl -s https://packages.bleemeo.com/bleemeo-agent/kubernetes/k8s.yaml | envsubst | kubectl apply -f -

This will start one Glouton on every node of your Kubernetes cluster.

The file "k8s.yaml" is updated with the newest version of Glouton, so to upgrade your Glouton, re-run the above commands.

Customize Glouton configuration on Kubernetes​

If you need to customize the Glouton configuration, the recommended way is to create a separated file with your changes, this will allow you to upgrade easily without need to merge your custom change into the Bleemeo provided k8s.yaml file:

echo "Creating the file glouton-custom.yaml which contains your changes"
cat > glouton-custom.yaml << EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: glouton-config
data:
99-local.conf: |
# Your changes here
EOF

Then for installation and for every update, run:

export GLOUTON_BLEEMEO_ACCOUNT_ID=<YOUR-ACCOUNT-ID>
export GLOUTON_BLEEMEO_REGISTRATION_KEY=<YOUR-REGISTRATION-KEY>
export GLOUTON_KUBERNETES_CLUSTERNAME="my_k8s_cluster_name"
curl -s https://packages.bleemeo.com/bleemeo-agent/kubernetes/k8s.yaml | envsubst | kubectl apply -f -,./glouton-custom.yaml

Note: there is no typo in -,./glouton-custom.yaml. This will:

  • Read first from stdin (-), which is the k8s.yaml file downloaded by curl
  • Then apply change from glouton-custom.yaml

Installation using Helm​

First, add the Bleemeo chart repository:

helm repo add bleemeo-agent https://packages.bleemeo.com/bleemeo-agent/helm-charts

To install and upgrade the agent, you can use the same command. Replace your account ID, your registration key and your cluster name in the command below.

helm repo update

helm upgrade --install glouton bleemeo-agent/glouton \
--set account_id="your_account_id" \
--set registration_key="your_registration_key" \
--set config.kubernetes.clustername="my_k8s_cluster_name" \
--set namespace="default"

The cluster name is used by the Bleemeo agents to know they belong to the same cluster, so this value need to be unique for each Kubernetes cluster you have.

You can customize the agent configuration in the values, for example to change the log level, you can add --set config.logging.level="DEBUG".