شعار K8s Fluent Bit Troubleshooting

K8s Fluent Bit Troubleshooting

مؤسسة
k8s-servant
k8s-fluent-bit-troubleshooting

استخدم هذه المهارة عندما لا يسلّم Fluent Bit السجلات على Kubernetes: تتعطل DaemonSet بسبب خطأ في الإعدادات ("tried to instance a plugin name that doesn't exist"، "unknown configuration property"، "configuration file contains errors")، أو يفشل أحد مخرجات السجلات ("failed to flush chunk"، "cannot be retried"، "no upstream connections available"، "getaddrinfo"، "Connection refused")، أو تصل السجلات من دون بيانات Kubernetes الوصفية ("could not get meta for POD")، أو تصل الأسطر بلا تحليل أو لا تصل إطلاقًا (مسار tail، أو المحلل، أو تنسيق CRI مقابل Docker)، أو تتوقف المدخلات مؤقتًا ("paused (mem buf overlimit"). تشمل المهارة مخطط Helm وFluent Operator. تفحص المشكلة باستخدام kubectl get والسجلات ونقاط HTTP للقراءة فقط في Fluent Bit، وتقترح حلولًا. تبدأ بالقراءة وتطلب إذنك قبل إجراء أي تغيير.

نظرة عامة

الناشرk8s-servant
المستودعk8s-skills
اسم المهارةk8s-fluent-bit-troubleshooting
النجوم
36
التفريعات
7
الملفات المرفقة
2
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 2

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها k8s-servant على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي K8s Fluent Bit Troubleshooting في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-fluent-bit-troubleshooting
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/k8s-servant/k8s-skills.git /tmp/k8s-skills
mkdir -p .claude/skills
cp -r /tmp/k8s-skills/skills/k8s-fluent-bit-troubleshooting .claude/skills/k8s-fluent-bit-troubleshooting
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل K8s Fluent Bit Troubleshooting في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة K8s Fluent Bit Troubleshooting تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط K8s Fluent Bit Troubleshooting بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Fluent Bit troubleshooting

Find out why Fluent Bit does not ship logs, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.

Fluent Bit runs as a DaemonSet: on every node a tail input reads the container log files under /var/log/containers/, the kubernetes filter adds pod metadata from the API server, and outputs send the records to a backend (Elasticsearch, Loki, an HTTP endpoint, a forwarder). Its own log names each part as [input:tail:tail.0], [filter:kubernetes:kubernetes.0], [output:http:http.0], so the log usually names the cause. The Helm chart keeps the config in a ConfigMap (fluent-bit.conf); the Fluent Operator builds it from custom resources into a Secret.

The commands use placeholders: my-namespace, my-fluent-bit (the DaemonSet, its ConfigMap and its ServiceAccount), my-fluent-bit-pod (one of its pods) and my-backend (the Service an output sends to). Replace them with the real names. Never read Secrets: not the Fluent Operator's rendered config, not Secrets that outputs take credentials from. The ConfigMap may hold credentials inline (HTTP_Passwd, http_api_key, cloud_auth, bearer_token, AWS keys): read it, but never repeat those values. Avoid kubectl describe pod on Fluent Bit: it prints literal environment values. Never request /api/v1/trace/... (a GET turns tracing on) and never POST to /api/v2/reload.

When to use

  • Logs are missing, late, or incomplete at the log backend.
  • Fluent Bit pods crash, restart, or are not Ready.
  • Records arrive without kubernetes fields, or with the raw <time> stdout F <line> text in log.

Hand-offs, by skill name. When the evidence points elsewhere, continue with that skill; if it is not installed, keep going with the steps here and tell the user which skill would help:

  • The backend refuses what Fluent Bit sends (Loki 400, 401, 429): k8s-loki-troubleshooting.
  • The backend's Service has no endpoints or a NetworkPolicy blocks it: k8s-network-troubleshooting.
  • The kubernetes filter is refused by RBAC: k8s-rbac-troubleshooting.
  • Pods are Pending, OOMKilled or evicted: k8s-workload-troubleshooting.

Investigate

Work through the steps in order. Stop when you have the cause and its evidence.

1. See the DaemonSet and its pods: ready on every node, restarts.

bash
kubectl get daemonsets -A -l app.kubernetes.io/name=fluent-bit
kubectl get pods -n my-namespace -l app.kubernetes.io/name=fluent-bit -o wide

2. Read Fluent Bit's log, current and before the last restart. Errors and warnings name the input, filter or output.

bash
kubectl logs -n my-namespace daemonset/my-fluent-bit --tail=100
kubectl logs -n my-namespace daemonset/my-fluent-bit --previous --tail=50
kubectl logs -n my-namespace daemonset/my-fluent-bit --tail=500 | grep -E '\[ ?(error|warn)\]'

3. Read the config: inputs (Path, parsers), filters, outputs (Name, Host, Port, Match). Do not repeat credentials you see.

bash
kubectl get daemonset my-fluent-bit -n my-namespace -o jsonpath='{.spec.template.spec.containers[0].args}{"\n"}{range .spec.template.spec.volumes[*]}{.name}{" "}{.configMap.name}{.secret.secretName}{.hostPath.path}{"\n"}{end}'
kubectl get configmap my-fluent-bit -n my-namespace -o yaml

4. Check what the outputs and the kubernetes filter depend on: the backend's Service, and the ServiceAccount's access to pods and namespaces.

bash
kubectl get services,endpointslices -A | grep -i my-backend
kubectl get clusterrolebindings -o wide | grep my-fluent-bit
kubectl auth can-i list pods --as=system:serviceaccount:my-namespace:my-fluent-bit

5. Ask Fluent Bit itself (port 2020, if HTTP_Server is on), through the API server's pod proxy, if your credentials allow get on pods/proxy (the built-in view role does not). Each pod reports for its own node.

bash
kubectl get --raw /api/v1/namespaces/my-namespace/pods/my-fluent-bit-pod:2020/proxy/api/v2/health
kubectl get --raw /api/v1/namespaces/my-namespace/pods/my-fluent-bit-pod:2020/proxy/api/v1/metrics

6. Open the matching reference and follow its steps:

What you seeReference
A crash at start, config errors, the Fluent Operator's resources, hot reloadreferences/config-and-operator.md
Outputs failing, retries, dropped chunks, backpressure, missing metadata, tail and parsers, the HTTP endpointsreferences/pipeline.md

Read the results

What the common findings mean (Fluent Bit 5.1):

  • [config] section 'htttp' tried to instance a plugin name that doesn't exist then configuration file contains errors, aborting.: a misspelled plugin Name; the pod exits and goes to CrashLoopBackOff.
  • [net] getaddrinfo(host='...', err=4): Domain name not found with [output:http:http.0] no upstream connections available to ...: the output's Host does not resolve. Then [engine] failed to flush chunk '...', retry in N seconds and, once retries run out, chunk '...' cannot be retried: those logs are dropped. The default Retry_Limit is 1; the Helm chart sets False (retry forever).
  • [net] TCP connection failed: host:port (Connection refused): the name resolves, but nothing listens there (the backend is down, or the port is wrong).
  • [filter:kubernetes:kubernetes.0] could not get meta for POD ...: the filter cannot read pod metadata (RBAC, Kube_URL, the API server unreachable). Fluent Bit keeps running and ships records without kubernetes fields; the HTTP status is only logged at debug level.
  • Records with log holding 2026-... stdout F <line>: the parser does not match the runtime's log format; containerd and CRI-O write CRI lines, so use multiline.parser docker, cri.
  • [input] tail.0 paused (mem buf overlimit: the output cannot keep up, and the tail input stops reading until memory frees; lines can be lost on rotation.

State the cause in one sentence, then the evidence you saw (the log lines with their plugin prefix, the config entries), then the proposed fix.

Proposed fix

Show each fix to the user before running it: what it changes and how to undo it. Fluent Bit's config and RBAC serve every node and every workload's logs: never change them yourself; hand them to the user as proposed fixes. Prefer fixing the source (the Helm values or the Fluent Operator's resources). Fluent Bit reads its config only at start unless hot reload is on, so a changed ConfigMap needs a restart. Write each undo with the values you found.

Fix the config in its source, apply it, and restart the DaemonSet so it reads it:

Proposed fix: review before running. The agent does not run this.

bash
kubectl apply -f my-fluent-bit-configmap.yaml
kubectl rollout restart daemonset/my-fluent-bit -n my-namespace
# Undo: kubectl apply -f my-fluent-bit-configmap-before.yaml, then restart the DaemonSet again

Bind the role the kubernetes filter needs (read on pods and namespaces) to Fluent Bit's ServiceAccount:

Proposed fix: review before running. The agent does not run this.

bash
kubectl create clusterrolebinding my-fluent-bit --clusterrole=my-fluent-bit --serviceaccount=my-namespace:my-fluent-bit
# Undo: kubectl delete clusterrolebinding my-fluent-bit

Once the config or the access is fixed, restart Fluent Bit so it picks it up:

Ask first: the agent runs this only after the user approves it.

bash
kubectl rollout restart daemonset/my-fluent-bit -n my-namespace
# Undo: none needed; the restart only recreates the pods with the same template

Sources

Checked against the Fluent Bit 5.1 documentation and source (v5.1.5), the Helm chart fluent-bit 0.58.3 and the Fluent Operator v3.10.1:

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي K8s Fluent Bit Troubleshooting؟

استخدم هذه المهارة عندما لا يسلّم Fluent Bit السجلات على Kubernetes: تتعطل DaemonSet بسبب خطأ في الإعدادات ("tried to instance a plugin name that doesn't exist"، "unknown configuration property"، "configuration file contains errors")، أو يفشل أحد مخرجات السجلات ("failed to flush chunk"، "cannot be retried"، "no upstream connections available"، "getaddrinfo"، "Connection refused")، أو تصل السجلات من دون بيانات Kubernetes الوصفية ("could not get meta for POD")، أو تصل الأسطر بلا تحليل أو لا تصل إطلاقًا (مسار tail، أو المحلل، أو تنسيق CRI مقابل Docker)، أو تتوقف المدخلات مؤقتًا ("paused (mem b...

لماذا تستخدم K8s Fluent Bit Troubleshooting على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة K8s Fluent Bit Troubleshooting عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت K8s Fluent Bit Troubleshooting في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-fluent-bit-troubleshooting. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام K8s Fluent Bit Troubleshooting؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع K8s Fluent Bit Troubleshooting؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام K8s Fluent Bit Troubleshooting معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي K8s Fluent Bit Troubleshooting مجانية؟

نعم. نشرها k8s-servant على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇