Outcold Solutions LLC

Monitoring Kubernetes - Version 5

Configuration

collectorforkubernetes.yaml

To find server version of your Kubernetes cluster use

$ kubectl version

Match the server version with one of the links below. If you are using version, which is not in this list you can try the closest version.

If you are using version, which is not on the list, please email us contact@outcoldsolutions.com

Created Kubernetes Objects

Configuration file collectorforkubernetes.yaml creates several Kubernetes Objects.

  • Namespace collectorforkubernetes.
  • ClusterRole collectorforkubernetes with limited capabilities to get, list and watch deployed objects. Collector uses this information to enrich logs and stats with kubernetes specific metadata.
  • ServiceAccount collectorforkubernetes is used to connect to Kubernetes API.
  • ClusterRoleBinding collectorforkubernetes to bind service account to cluster role.
  • ConfigMap collectorforkubernetes delivers configuration files for collector.
  • DaemonSet collectorforkubernetes allows to deploy collector on none-master nodes.
  • DaemonSet collectorforkubernetes-master allows to deploy collector on master nodes.
  • Deployment collectorforkubernetes-addon is a single collector, that needs to forward data from the whole cluster once.

Read commentaries in collectorforkubernetes.yaml file to get more deep details on all configurations and source of the logs and metrics.

Collector configuration

ConfigMap collectorforkubernetes delivers configuration files for collector. These are ini files, where you can find all the default values.

Values can be overridden using environment values with the format as specified below

COLLECTOR__{ANY_NAME}={section}__{key}={value}

Configurations with environment variables are the simplest way to explore and debug quickly, but we recommend to write your configuration file based on the default provided with collectorforkubernetes.yaml.

Using secrets to manage configurations

You can use Kubernetes secrets and map them as an environment variable to override configurations for the collector.

As an example, we will show how you can configure HTTP Event Collector and License with secrets.

At first, make sure that collectorforkubernetes namespace already exists. If it does not exist, you need to create it.

kubectl create namespace collectorforkubernetes
kubectl create secret generic collectorforkubernetes \
    --namespace collectorforkubernetes \
    --from-literal=splunk-token="output.splunk__token=B5A79AAD-D822-46CC-80D1-819F80D7BFB0" \
    --from-literal=license="general__license="

In our YAML manifest find a configuration of environment variables for each Deployment type (2 DaemonSets and 1 Deployment) and add following the information to the environment variables

env:
- name: COLLECTOR__SPLUNK_TOKEN
  valueFrom:
    secretKeyRef:
      name: collectorforkubernetes
      key: splunk-token
- name: COLLECTOR__LICENSE
  valueFrom:
    secretKeyRef:
      name: collectorforkubernetes
      key: license

Apply the manifest by following installation instructions.


About Outcold Solutions

Outcold Solutions provides solutions for monitoring Kubernetes, OpenShift and Docker clusters in Splunk Enterprise and Splunk Cloud. We offer certified Splunk applications, which give you insights across all containers environments. We are helping businesses reduce complexity related to logging and monitoring by providing easy-to-use and deploy solutions for Linux and Windows containers. We deliver applications, which help developers monitor their applications and operators to keep their clusters healthy. With the power of Splunk Enterprise and Splunk Cloud, we offer one solution to help you keep all the metrics and logs in one place, allowing you to quickly address complex questions on container performance.