No video

Fluentd on Kubernetes: Log collection explained

  Рет қаралды 49,083

That DevOps Guy

That DevOps Guy

Күн бұрын

Subscribe to show your support! goo.gl/1Ty1Q2 .
Patreon 👉🏽 / marceldempers
In this video we take a look at log collection on a kubernetes cluster.
We take a look at the fluentd dockerfile, how to run it on each kubernetes node using a daemonset.
More importantly is the configuration required to tell fluentd how to collect logs. We also look into where logs are stored on each kubernetes node.
Finally we see how to ship the collected logs out of the cluster.
Checkout my Introduction to Logging video:
• Understanding Logging:...
Checkout my Introduction to Fluentd video:
• Introduction to Fluent...
Checkout the source code below 👇🏽 and follow along 🤓
Also if you want to support the channel further, become a member 😎
marceldempers....
Checkout "That DevOps Community" too
marceldempers....
Source Code 🧐
--------------------------------------------------------------
github.com/mar...
If you are new to Kubernetes, check out my getting started playlist on Kubernetes below :)
Kubernetes Guide for Beginners:
---------------------------------------------------
• Kubernetes development...
Kubernetes Monitoring Guide:
-----------------------------------------------
• Kubernetes Monitoring ...
Kubernetes Secret Management Guide:
--------------------------------------------------------------
• Kubernetes Secret Mana...
Like and Subscribe for more :)
Follow me on socials!
marceldempers.dev
Twitter | / marceldempers
GitHub | github.com/mar...
Facebook | thatdevop...
LinkedIn | / marceldempers
Instagram | / thatdevopsguy
Music:
Track: Amine Maxwell - Amine Maxwell & MICHAL - Chill Night | is licensed under a Creative Commons Attribution licence (creativecommon...)
Listen: / amine-maxwell-michal-c...
Track: POLAROID PAPI - audi | is licensed under a Creative Commons Attribution licence (creativecommon...)
Listen: / audi
Track: Amine Maxwell - Amine Maxwell & Soyb - You & I | is licensed under a Creative Commons Attribution licence (creativecommon...)
Listen: / amine-maxwell-soyb-you-i
Track: Amine Maxwell - Night And The City | is licensed under a Creative Commons Attribution licence (creativecommon...)
Listen: / night-and-the-city
Track: LiQWYD - Bridges (Free download) | is licensed under a Creative Commons Attribution licence (creativecommon...)
Listen: / bridges-free-download
Track: Soyb - Soyb & Amine Maxwell - California | is licensed under a Creative Commons Attribution licence (creativecommon...)
Listen: / soyb-amine-maxwell-cal...
Track: souKo - souKo - Parallel | is licensed under a Creative Commons Attribution licence (creativecommon...)
Listen: / parallel

Пікірлер: 70
@amukher1
@amukher1 Жыл бұрын
This is perhaps the best single resource to understand how to setup fluentd (and by extension Fluent Bit) for a k8s environment. There's so much of crud out there in the form of blog articles and documentation, not to mention a book by a certain well-known publisher, all of which are completely useless. It really should be a lot simpler - this video takes care of it.
@videobrice
@videobrice 3 ай бұрын
Thanks for this excellent and exhaustive tutorial !
@MarcelDempers
@MarcelDempers 3 ай бұрын
Thanks so much for the kind words and support 🙏🏼
@videomaster1393
@videomaster1393 8 ай бұрын
Bro, trust me you are "that guy"! every minute is valuable and go straight to the point!! Big thanks!!
@Jak6711
@Jak6711 3 жыл бұрын
I've got to say, I really appreciate these videos. As an intern trying to get into the field of DevOps, your tutorials are always my go to. Fast, concise and extremely helpful. Thanks alot!
@sravankumar..
@sravankumar.. 2 жыл бұрын
You are the one stop to clear all my questions on kuberentes. Just I need to watch all your kubernetes videos to clear all my questions, great man 🙏🏽🙏🏽 You are a wonderful guy, love from India.
@devops-techstack
@devops-techstack Жыл бұрын
Thank you so much for sharing this knowledge . It helped a lot while i was struggling to send logs to Stackdriver.
@bisuaws5377
@bisuaws5377 3 жыл бұрын
You are the genuine Devops Builder, many thanks 😊
@Misanthrope84
@Misanthrope84 3 жыл бұрын
Another brilliant video mate 🤟 please keep them coming!
@ckalas
@ckalas 3 жыл бұрын
new video idea: the implications of k8s dropping docker as default container runtime
@oraculotube
@oraculotube 3 жыл бұрын
Thank you very much to share your knowledge. much appreciate that.
@ThiagoSilva-87
@ThiagoSilva-87 3 жыл бұрын
Thanks for the teaching. You are amazing !!!
@arpanchakraborty9874
@arpanchakraborty9874 3 жыл бұрын
Amazing, thanks so much, very simply explained yet very informative and almost all you need to know to start off with EFK.
@krishnakanth6106
@krishnakanth6106 7 ай бұрын
Very well explained.... Thanks a lot😊
@rabithbo7089
@rabithbo7089 Жыл бұрын
Thanks so much, it is amazing tutorial.
@vijaytamhankar5874
@vijaytamhankar5874 2 жыл бұрын
Nicely explained. Easy to follow steps 👍
@rahulsingh-iq4gd
@rahulsingh-iq4gd Жыл бұрын
Sheer knowledge… only , thank you so much
@roninl4348
@roninl4348 Жыл бұрын
Thanks a lot man.
@vladimirsiman8838
@vladimirsiman8838 3 жыл бұрын
Cool stuff, thanks a lot ! Great !
@heyitsmekishore
@heyitsmekishore 2 жыл бұрын
Thanks for the Video it's really helpful. Can you please tell how to fetch logs from one particular namespace
@brenokevin3995
@brenokevin3995 2 жыл бұрын
Very good, I really liked the video :D
@1006931080
@1006931080 3 жыл бұрын
You are doing a great job buddy, thanks for awesome video. You have any plans for fluentbit?
@shahrukh49
@shahrukh49 3 жыл бұрын
Very Helpful. Thanks.
@LuisMiguelZapata
@LuisMiguelZapata 2 жыл бұрын
Amazing.. Thank you!
@lucaricchi5873
@lucaricchi5873 2 жыл бұрын
Loved this! What kind of english accent is this? As an italian speaker I can not guess ;) great job btw
@irfannian1502
@irfannian1502 3 жыл бұрын
For a weird reason, I am unable to find file-test.log in my /tmp/ folder as shown in 20:45. Prior to that, everything seems to be executing fine.
@mula.nareshgowd1381
@mula.nareshgowd1381 Жыл бұрын
I am also caught up with error.could you please let me know how to resolve this @irfan Nian
@ankitlakum1
@ankitlakum1 3 жыл бұрын
fluent and magical
@DevOpsKey1
@DevOpsKey1 3 жыл бұрын
Nice mentor
@amukher1
@amukher1 Жыл бұрын
A basic question. How does Fluent Bit enrich the logs with kubernetes container, pod, and namespace information? Does it derive it from file naming conventions (and then from kube-api as you mentioned)?
@learndevopswithadnan9569
@learndevopswithadnan9569 3 жыл бұрын
Thanks for sharing the beautifully explained Fluentd-elasticsearch as K8S daemonset. I am using ES on https with SSL implementation and facing "error_class=Fluent::Plugin::ElasticsearchErrorHandler::ElasticsearchError error="400 - Rejected by Elasticsearch" location=nil ..." Any hint regarding this error.
@UnknownSend3r
@UnknownSend3r 2 жыл бұрын
Did you find the reason you were getting such an error ?
@PePTo-dx2yj
@PePTo-dx2yj 7 ай бұрын
may be somebody recive this, Im using containerd instead docker (CRI) in k8s, when was docker all works fine but containerd : [warn]: #0 [in_tail_container_logs] pattern not matched ....what can be trouble?
@anandnandu968
@anandnandu968 Жыл бұрын
sir i want to deploy only fluentd in k8s cluster without kibana and elasticksearch . is it possible.
@PankajPandey-pw4wp
@PankajPandey-pw4wp 3 жыл бұрын
Thanks for this video. what is the best namespace to run daemon-sets like node exporter or fluentd ? namespace where application pods are already running or "kube-system" or completely separate name space?
@MarcelDempers
@MarcelDempers 3 жыл бұрын
It's a personal choice I prefer to leave Kubernetes stuff in kube-system and introduce my own purpose-built namespaces like "monitoring" for all monitoring related things. I would also keep these things far away from application namespaces 💪🏽
@PankajPandey-pw4wp
@PankajPandey-pw4wp 3 жыл бұрын
@@MarcelDempers thanks
@aditiarahman435
@aditiarahman435 3 жыл бұрын
hello I have my logs inserted to elasticsearch from kubernetes pods, I try direct http query to elasticssearch and all the data logs are shown, but some logs with long string are not showing in kibana, do you know what causing this?
@iimnurdiansyah53
@iimnurdiansyah53 3 жыл бұрын
Hello, what is the big different between fluentd and fluentbit? When we choose fluentd or fluentbit?
@user-sv9us4rh3v
@user-sv9us4rh3v 5 ай бұрын
Is it possible to run it as sidecar container ?
@bhuvanparashar1632
@bhuvanparashar1632 2 жыл бұрын
Hi, what will happen if I use more than one source targeting the same path?
@tiny3241
@tiny3241 Жыл бұрын
thank you! can I direct custom logs to write to fluentd ? like some log file in /opt path
@MarcelDempers
@MarcelDempers Жыл бұрын
For k8s , this is an anti pattern, as fluentd reads logs from the container runtime like docker. I'd get DEVs to start writing logs to stdout instead. For legacy apps , you could have a sidecar app that reads the file and writes to stdout for fluentd to pick up.
@georgelza
@georgelza 3 жыл бұрын
... another request... any chance you can do a video of doing all of this on a minikube environment, as probably used by allot as a on laptop dev environment. ... as we're on a laptop we prob won't have a local ELK stack, so dumping all likes into a single text file is nice as you can then locally only tail one file, and see the log messages from all the pods running. :)
@DevOpsKey1
@DevOpsKey1 2 жыл бұрын
Please genrate a Video on fluentd and prometheus configuration in K8s using yml file without helm.
@rahulchauhan3188
@rahulchauhan3188 2 жыл бұрын
I have multiple namespaces, how can i get logs from all the pods present is particular single namespace? please reply asap, it kind of urgency sir. thanks and love ❤️ from india.
@nitishsharma5814
@nitishsharma5814 3 жыл бұрын
Nice content. Thanks. Can you please help us in using the kubernetes _metadata as the file_name or indexname for elasticearch
@1milad
@1milad 2 жыл бұрын
hi, how can store logs per namespace in different index?
@gnaneethi81
@gnaneethi81 2 жыл бұрын
Amazing , How do we get appended the index_name fluentd-k8s fluentd-k8s-appname
@csgrinds
@csgrinds 3 жыл бұрын
Great video - btw is pronounced demon!
@nikhuge6580
@nikhuge6580 3 жыл бұрын
Great
@deepaknayak9912
@deepaknayak9912 2 жыл бұрын
Hi, Can Fluentd replace #autodiscover feature of filebeat? Which helps to get the logs of #autoscaling environment
@emiribrahimbegovic813
@emiribrahimbegovic813 2 жыл бұрын
how do you deal with log rotation?
@georgelza
@georgelza 3 жыл бұрын
Hi Marcel, any idea when you will be able to do a ElasticSearch stack for us ? ... using the Beats framework.
@MarcelDempers
@MarcelDempers 3 жыл бұрын
I'm not 100% on an ETA, but planning an Elastic Search series at some point, similar to the RabbitMQ + Redis series 💪🏽
@georgelza
@georgelza 3 жыл бұрын
@@MarcelDempers would be nice if its like the others, ElasticSearch+Logstash+Kibana on Kind, data coming from basic OS via FileBeat, maybe some metrics via MetricBeat and as per always instrument a K8S cluster... if I can try my luck. hope the "point" is soon, hehehehe
@georgelza
@georgelza 3 жыл бұрын
@@MarcelDempers ... got idea how to make it a tad more complicated, have *Beats push data onto a Kafka Topic, and have Kafka then sink it via a connector directly into ElasticSearch, bypassing Logstash. The aggregate and other math can be done on Kafka via kSQLDB and stream processing... now thats really pushing my luck, hehehehe
@Ashe94
@Ashe94 3 жыл бұрын
So this example only collects stdout, right? If I want to have apache errors logs or something I need to include them in my fluentd Config?
@MarcelDempers
@MarcelDempers 3 жыл бұрын
In Kubernetes you're better off configuring Apache container to write to stdout instead of a log file. this makes container log collection transparent across the system and more scalable
@hellboy0666006660
@hellboy0666006660 3 жыл бұрын
@@MarcelDempers Would we then write error logs and access logs to stdout? Usually they are separated in different files (e.g. nginx), but if I write both to stdout they will be mixed in one 'file'. Would that be ok, to not have that separated?
@MarcelDempers
@MarcelDempers 3 жыл бұрын
@@hellboy0666006660 That would be ok. They may go out of the system in the same stream, but you'll be able to view both in what ever system you are analyzing them in. I.E in elastic search is where you will be able to separate them
@elidrissii
@elidrissii 3 жыл бұрын
@@hellboy0666006660 I personally write error logs to stderr. It's just cleaner to keep the separation.
@abhichennupati16
@abhichennupati16 Жыл бұрын
I see my pos_file is missing, what might be the reason?
@MarcelDempers
@MarcelDempers Жыл бұрын
Make sure you retain it somewhere, like a volume mount when using a container. Else it would be lost when the container restarts
@muralikrishnaallaparthi2480
@muralikrishnaallaparthi2480 8 ай бұрын
@@MarcelDempers sir, what lines to be included in the yaml file for volume mount of the pos_file. One more question, In this vedio we are writing the logs to elastic search or output file. Once the log is written to elastic search whether it is deleted automatically from pods.
@bombdrive3880
@bombdrive3880 Жыл бұрын
kubernetes_metadata could only enrich data from /var/log/containers. It claims to be able to enrich "application data", but it actually does not... = =. The documentation is so misleading.
@vibinck19
@vibinck19 2 жыл бұрын
100 likes
Istio Service mesh explained
33:14
That DevOps Guy
Рет қаралды 53 М.
Understanding Kubernetes RBAC | Access control basics explained
33:29
That DevOps Guy
Рет қаралды 49 М.
КАКУЮ ДВЕРЬ ВЫБРАТЬ? 😂 #Shorts
00:45
НУБАСТЕР
Рет қаралды 3,1 МЛН
If Barbie came to life! 💝
00:37
Meow-some! Reacts
Рет қаралды 68 МЛН
Parenting hacks and gadgets against mosquitoes 🦟👶
00:21
Let's GLOW!
Рет қаралды 13 МЛН
艾莎撒娇得到王子的原谅#艾莎
00:24
在逃的公主
Рет қаралды 50 МЛН
How Fluentd simplifies collecting and consuming logs | Fluentd simply explained
10:51
Kubernetes, логи [2], fluentbit
59:38
Артур Крюков
Рет қаралды 6 М.
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 271 М.
Introduction to Fluentd: Collect logs and send almost anywhere
21:06
That DevOps Guy
Рет қаралды 73 М.
Kubernetes logging with EFK
45:45
Cloudnloud Technologies
Рет қаралды 2,2 М.
Kubernetes cluster autoscaling for beginners
12:55
That DevOps Guy
Рет қаралды 51 М.
Understanding StatefulSets in Kubernetes
28:44
That DevOps Guy
Рет қаралды 47 М.
Calico для сети в Kubernetes
16:57
Check Point CheckMates in Russian
Рет қаралды 5 М.
Why I use Windows as a DevOps Engineer
21:07
That DevOps Guy
Рет қаралды 17 М.
КАКУЮ ДВЕРЬ ВЫБРАТЬ? 😂 #Shorts
00:45
НУБАСТЕР
Рет қаралды 3,1 МЛН