Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Beats for k8s monitoring #2417

Closed
pebrc opened this issue Jan 13, 2020 · 3 comments
Closed

Running Beats for k8s monitoring #2417

pebrc opened this issue Jan 13, 2020 · 3 comments
Assignees
Labels
discuss We need to figure this out

Comments

@pebrc
Copy link
Collaborator

pebrc commented Jan 13, 2020

Relates to #2051

Should ECK support running Beats on k8s:

Two main options come to mind:

  • create a Helm chart or similar YAML packaging that deploys for example Metricbeat and Filebeat alongside ECK
  • support *beats as first class objects in ECK via a CRD
apiVersion: beats.k8s.elastic.co/v1beta1
kind: Filebeat
metadata:
  name: ""
  namespace: ""
spec:
  config:
    inline: {}   # we use inline config for all other resources but with structural schema around the corner
    configMap: "" # we might want to support just a ConfigMap reference
  deamonSet:
    template: {}  # give user the ability to template the spec for the DaemonSet similar to what we do for all other resources
  elasticsearchRef:
    name: ""
    namespace: ""
  version: 7.5.0
---
apiVersion: beats.k8s.elastic.co/v1beta1
kind: Metricbeat
metadata:
  name: ""
  namespace: ""
spec:
  config:
    inline: {}
    configMap: ""
  modules:
    inline: {}
    configMap: ""
  deployment:
    template: {}
  deamonSet:
    template: {}
  elasticsearchRef:
    name: ""
    namespace: ""
  version: 7.5.0

The main motivation for involving ECK in the deployment of Beats is that it can add value by automating tedious or error prone aspects of configuring Beats. For example:

  • ECK could automatically configure the necessary certificates to access a monitoring Elasticsearch cluster
  • ECK could automated user setup for the various beats
  • ECK could make sure Beats are rotated if configuration changes happen that are not automatically picked up by Beats. It seems like this is the case for certificate rotation (to be verified)

With that said we could also explore a third option which would be to keep Beats separate from ECK but to facilitate integration for example with a MutatingAdmissionWebhook that injects user credentials and Elasticsearch certificates into arbitrary containers as needed, which could be used to inject these credentials into Beats containers.

@pebrc pebrc added the discuss We need to figure this out label Jan 13, 2020
@pebrc pebrc mentioned this issue Jan 13, 2020
3 tasks
@anyasabo
Copy link
Contributor

I'm in favor of creating a proof of concept of a CRD. At least personally I struggle with how we could make this as useful as ES/Kibana/etc. The "hard" part IMO is the configuration (not so much the orchestration), but also for beats to be useful people need to apply a lot of their own configurations. As you said the biggest thing the operator can help with is hooking up the credentials/outputs. Maybe there is a way to provide useful defaults though that make the common case easy.

@david-kow
Copy link
Contributor

+1 on a new CRD. I think there is value in being able to version and reason about the specification that we would have in a CRD.

@david-kow david-kow self-assigned this Jan 30, 2020
@pebrc pebrc changed the title Running Beats with ECK Running Beats for k8s monitoring Feb 3, 2020
@david-kow
Copy link
Contributor

This is superseeded by #3040, hence closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss We need to figure this out
Projects
None yet
Development

No branches or pull requests

3 participants