# Filebeat as sidecar deployment in K8 cluster

**URL:** https://discuss.elastic.co/t/filebeat-as-sidecar-deployment-in-k8-cluster/114796
**Category:** Beats
**Tags:** filebeat
**Created:** [January 10, 2018, 6:39am UTC](https://discuss.elastic.co/t/filebeat-as-sidecar-deployment-in-k8-cluster/114796 "2018-01-10T06:39:41Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Vivek\_Samaga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek_samaga/32/43285_2.png) [@Vivek\_Samaga](https://discuss.elastic.co/u/Vivek_Samaga)
#### Post date: [January 10, 2018, 6:39am UTC](https://discuss.elastic.co/t/filebeat-as-sidecar-deployment-in-k8-cluster/114796/1 "2018-01-10T06:39:41Z")

</div>

HI ,

So am using spinnaker for deployment of our microservices to Kubernetes cluster.  
How to use filebeat as a sidecar pattern with other application to deploy simultaneously?

---

<div class="post-metadata">

### Author: ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)
#### Post date: [January 10, 2018, 10:49am UTC](https://discuss.elastic.co/t/filebeat-as-sidecar-deployment-in-k8-cluster/114796/2 "2018-01-10T10:49:20Z")

</div>

Hi @Vivek_Samaga,

We normally recommend deploying one instance per node, it should be able to get logs from all the containers in the node: [https://www.elastic.co/guide/en/beats/filebeat/6.1/running-on-kubernetes.html](https://www.elastic.co/guide/en/beats/filebeat/6.1/running-on-kubernetes.html)

That, compared with a sidecar per container will have more performance. Could you explain a little bit more about your use case? We can consider other options here

Best regards

---

<div class="post-metadata">

### Author: ![Vivek\_Samaga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek_samaga/32/43285_2.png) [@Vivek\_Samaga](https://discuss.elastic.co/u/Vivek_Samaga)
#### Post date: [January 10, 2018, 11:27am UTC](https://discuss.elastic.co/t/filebeat-as-sidecar-deployment-in-k8-cluster/114796/3 "2018-01-10T11:27:13Z")

</div>

So i don't have direct access to the node so i can't use `kubectl create` command.  
We are working on CI/CD implementation with Jenkins to test, build and deploy the docker image to the server groups via spinnaker.  
How can I achieve this?  
Just like docker filebeat image?

---

<div class="post-metadata">

### Author: ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)
#### Post date: [January 10, 2018, 3:38pm UTC](https://discuss.elastic.co/t/filebeat-as-sidecar-deployment-in-k8-cluster/114796/4 "2018-01-10T15:38:03Z")

</div>

I don't have much experience with Spinnaker, but my understanding is that you can feed it with any Deployment yaml you want?

---

<div class="post-metadata">

### Author: ![Vivek\_Samaga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek_samaga/32/43285_2.png) [@Vivek\_Samaga](https://discuss.elastic.co/u/Vivek_Samaga)
#### Post date: [January 12, 2018, 2:17pm UTC](https://discuss.elastic.co/t/filebeat-as-sidecar-deployment-in-k8-cluster/114796/5 "2018-01-12T14:17:45Z")

</div>

Yes, I have another question? If we deploy sidecar pattern in Kubernetes and forward the logs to logstash host, would it support?

---

<div class="post-metadata">

### Author: ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)
#### Post date: [January 15, 2018, 10:54am UTC](https://discuss.elastic.co/t/filebeat-as-sidecar-deployment-in-k8-cluster/114796/6 "2018-01-15T10:54:23Z")

</div>

Sending logs to logstash should work, yes

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 12, 2018, 10:54am UTC](https://discuss.elastic.co/t/filebeat-as-sidecar-deployment-in-k8-cluster/114796/7 "2018-02-12T10:54:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
