We have built a Docker fluentd container which bundles our plugin and is straightforward to configure to ship logs to Sophie.
The container is based on the official Kubernetes documentation for cluster-level logging suggests using a Fluentd.
Please note that this approach only works for shipping applications’ standard output and standard error.

  1. Create the Fluentd DeamonSet configuration file based on the configuration below (fluent-kubernetes-loomsystems.yaml):
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: fluentd-loomsystems
  namespace: kube-system
  labels:
    k8s-app: fluentd-loomsystems
    version: v1
    kubernetes.io/cluster-service: "true"
spec:
  template:
    metadata:
      labels:
        k8s-app: fluentd-loomsystems
        version: v1
        kubernetes.io/cluster-service: "true"
    spec:
      tolerations:
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      containers:
      - name: fluentd
        image: loomsystems/fluentd-kubernetes-loomsystems:v0.12.43-loomsystems
        imagePullPolicy: Always
        env:
          - name:  FLUENT_UID
            value: "0"
          - name:  LOOM_RECIEVER_HOST
            value: "{{RECEIVER HOST}}"
          - name:  LOOM_RECIEVER_SSL_PORT
            value: "{{SSL PORT}}"
          - name:  LOOM_USE_SSL
            value: "true"
          - name:  LOOM_RECIEVER_PORT
            value: "8888"
        resources:
          limits:
            memory: 200Mi
          requests:
            cpu: 100m
            memory: 200Mi
        volumeMounts:
        - name: varlog
          mountPath: /var/log
        - name: varlibdockercontainers
          mountPath: /var/lib/docker/containers
          readOnly: true
      terminationGracePeriodSeconds: 30
      volumes:
      - name: varlog
        hostPath:
          path: /var/log
      - name: varlibdockercontainers
        hostPath:
          path: /var/lib/docker/containers

Replace the template variables:

  • {{RECEIVER HOST}} - should be similar to acme-data.loomsystems.com
  • {{SSL PORT}} - for SaaS deployments, coordinate this with Loom's support. For onprem deployments, use the TCP port that was configured as an input.

Note - logs are encrypted by default . While we provide the option to send without encryption, we strongly discourage doing so.

   2. Save the configuration file on the home directory of the host/master node running Kubernetes.

   3. Create the DemonSet based on the configuration file using the following command:

kubectl create -f fluent-kubernetes-loomsystems.yaml


   4. Logs will be arriving to your Loom instance, this may take up to 5 minutes.

Testing the DaemonSet

The simplest way to test this shipper is to setup a cluster using MiniKube.
Follow the instructions provided here to create a lab Kubernetes environment.
Next, create a new DaemonSet configuration file as instructed above and deploy it, e.g. by running:

kubectl create -f fluent-kubernetes-loomsystems.yaml

Browse to Loom and search for logs coming from the test cluster.

Did this answer your question?