Installation
Installation on Kubernetes
Section titled “Installation on Kubernetes”The Bleemeo agent supports discovering services running on Kubernetes. It will monitor all known services and gather Docker container metrics.
The agent can be installed using kubectl or using Helm.
Installation with kubectl
Section titled “Installation with kubectl”To monitor your services, access to the Kubernetes API is required. The easiest way 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 following uses envsubst (it should be available on all Linux distributions) 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
Section titled “Customize Glouton configuration on Kubernetes”If you need to customize the Glouton configuration, the recommended way is to create a separate file with your changes. This lets you upgrade easily without needing to merge your custom changes into the Bleemeo-provided k8s.yaml file:
echo "Creating the file glouton-custom.yaml which contains your changes"cat > glouton-custom.yaml << EOFapiVersion: v1kind: ConfigMapmetadata: name: glouton-configdata: 99-local.conf: | # Your changes hereEOFThen 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.yamlNote: 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 changes from glouton-custom.yaml
Installation using Helm
Section titled “Installation using Helm”First, add the Bleemeo chart repository:
helm repo add bleemeo-agent https://packages.bleemeo.com/bleemeo-agent/helm-chartsTo 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 needs 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".