kfl
यह क्या करती है
यह AI को KFL की सिंटैक्स और फ़ील्ड सिखाती है, जो Kubeshark में ट्रैफ़िक ढूँढने की फ़िल्टर भाषा है। यह क्लस्टर ट्रैफ़िक खोजने वाले इंजीनियरों के लिए है।
कब इस्तेमाल करें
- ✓जब आप प्रोटोकॉल, पोर्ट या फ़ील्ड के आधार पर Kubeshark ट्रैफ़िक फ़िल्टर करना चाहते हैं।
- ✓जब आपको ऐसा KFL एक्सप्रेशन चाहिए जो कुछ requests या responses से मेल खाए।
- ✓जब KFL फ़िल्टर त्रुटि दे और उसे सुधारना हो।
Skill का लिंक
https://github.com/kubeshark/kubeshark/blob/master/skills/kfl/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप ऐसा Kubeshark फ़िल्टर लिख सकते हैं जो केवल पोर्ट 8080 के HTTP requests दिखाए?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI फ़ील्ड नामों और operators के लिए KFL संदर्भ इस्तेमाल करता है, फिर एक सही-या-गलत एक्सप्रेशन बनाता है जो आपके चाहे ट्रैफ़िक से मेल खाए।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
KFL2 — Kubeshark Filter Language
You are a KFL2 expert. KFL2 is built on Google's CEL (Common Expression Language) and is the query language for all Kubeshark traffic analysis. It operates as a display filter — it doesn't affect what's captured, only what you see.
Think of KFL the way you think of SQL for databases or Google search syntax for the web. Kubeshark captures and indexes all cluster traffic; KFL is how you search it.
For the complete variable and field reference, see references/kfl2-reference.md.
Core Syntax
KFL expressions are boolean CEL expressions. An empty filter matches everything.
Operators
| Category | Operators |
|---|---|
| Comparison | ==, !=, <, <=, >, >= |
| Logical | &&, ||, ! |
| Arithmetic | +, -, *, /, % |
| Membership | in |
| Ternary | condition ? true_val : false_val |
String Functions
str.contains(substring) // Substring search
str.startsWith(prefix) // Prefix match
str.endsWith(suffix) // Suffix match
str.matches(regex) // Regex match
size(str) // String length
Collection Functions
size(collection) // List/map/string length
key in map // Key existence
map[key] // Value access
map_get(map, key, default) // Safe access with default
value in list // List membership
Time Functions
timestamp("2026-03-14T22:00:00Z") // Parse ISO timestamp
duration("5m") // Parse duration
now() // Current time (snapshot at filter creation)
Negation
!http // Everything that is NOT HTTP
http && status_code != 200 // HTTP responses that aren't 200
http && !path.contains("/health") // Exclude health checks
!(src.pod.namespace == "kube-system") // Exclude system namespace
Protocol Detection
Boolean flags that indicate which protocol was detected. Use these as the first filter term — they're fast and narrow the search space immediately.
| Flag | Protocol | Flag | Protocol |
|---|---|---|---|
http |
HTTP/1.1, HTTP/2 | redis |
Redis |
dns |
DNS | kafka |
Kafka |
tls |
eBPF TLS interception | amqp |
AMQP |
tcp |
TCP | ldap |
LDAP |
udp |
UDP | ws |
WebSocket |
sctp |
SCTP | gql |
GraphQL (v1+v2) |
icmp |
ICMP | gqlv1 / gqlv2 |
GraphQL version-specific |
grpc |
gRPC (HTTP/2 sub-protocol) | mongodb |
MongoDB |
mysql |
MySQL | postgresql |
PostgreSQL |
radius |
RADIUS | ||
diameter |
Diameter | conn / flow |
L4 connection/flow tracking |
tcp_conn / udp_conn |
Transport-specific connections |
Kubernetes Context
The most common starting point. Filter by where traffic originates or terminates.
Pod and Service Fields
src.pod.name == "orders-594487879c-7ddxf"
dst.pod.namespace == "production"
src.service.name == "api-gateway"
dst.service.namespace == "payments"
Pod fields fall back to service data when pod info is unavailable, so
dst.pod.namespace works even for service-level entries.
Summary Name and Namespace
Convenience variables that pick the best available identity for a peer:
src.name == "api-gateway" // pod > service > dns > process
dst.name.contains("payment") // works across identity types
src.namespace == "production" // pod namespace, falls back to service
dst.namespace != "kube-system" // exclude system namespace
Aggregate Collections
Match against any direction (src or dst):
"production" in namespaces // Any namespace match
"orders" in pods // Any pod name match
"api-gateway" in services // Any service name match
Labels and Annotations
map_get(local_labels, "app", "") == "checkout" // Safe access with default
map_get(remote_labels, "version", "") == "canary"
"tier" in local_labels // Label existence check
Always use map_get() for labels and annotations — direct access like
local_labels["app"] errors if the key doesn't exist.
Node and Process
node_name == "ip-10-0-25-170.ec2.internal"
local_process_name == "nginx"
remote_process_name.contains("postgres")
DNS Resolution
src.dns == "api.example.com"
dst.dns.contains("redis")
HTTP Filtering
अक्सर पूछे जाने वाले सवाल
क्या KFL Kubeshark के कैप्चर को बदलता है?
नहीं। यह एक डिस्प्ले फ़िल्टर है, इसलिए यह केवल यह बदलता है कि आप कौन-सा कैप्चर किया ट्रैफ़िक देखते हैं।
क्या KFL किसी दूसरी भाषा पर आधारित है?
हाँ। यह Google की CEL, यानी Common Expression Language, पर आधारित है।
मेरा फ़िल्टर क्यों विफल होता है?
KFL statically typed है, इसलिए गलत फ़ील्ड नाम या सिंटैक्स त्रुटियाँ दे सकता है या चुपचाप नतीजे छोड़ सकता है।
जानकारी
लेखक का मूल विवरण
KFL2 (Kubeshark Filter Language) reference. This skill MUST be loaded before writing, constructing, or suggesting any KFL filter expression. KFL is statically typed — incorrect field names or syntax will fail silently or error. Do not guess at KFL syntax without this skill loaded. Trigger on any mention of KFL, CEL filters, traffic filtering, display filters, query syntax, filter expressions, write a filter, construct a query, build a KFL, create a filter expression, "how do I filter", "show me only", "find traffic where", protocol-specific queries (HTTP status codes, DNS lookups, Redis comman
repo: kubeshark/kubeshark
लोकप्रियता
- GitHub स्टार
- 12k
- रैंकिंग में स्थान
- #11474
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
install
12kआपके एजेंट को Kubernetes क्लस्टर पर Kubeshark इंस्टॉल करने में मदद करती है, त्वरित कमांड-लाइन सेटअप से लेकर पूरी Helm कॉन्फ़िगरेशन तक।
network-rca
12kआपके एजेंट को सहेजे गए नेटवर्क ट्रैफ़िक स्नैपशॉट पढ़कर Kubernetes क्लस्टर की पिछली नेटवर्क घटना की जाँच करने में मदद करती है।
security-audit
12kआपके एजेंट को Kubernetes क्लस्टर ट्रैफ़िक में हमलों, डेटा चोरी, मैलवेयर और दूसरे खतरों के संकेत जाँचने में मदद करती है।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।