1"use strict";(self.webpackChunkig_website=self.webpackChunkig_website||[]).push([[11790],{17330:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>p,frontMatter:()=>i,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"spec/operators/kubemanager","title":"KubeManager","description":"The KubeManager operator is used when Inspektor Gadget is deployed to Kubernetes","source":"@site/versioned_docs/version-v0.56.0/spec/operators/kubemanager.md","sourceDirName":"spec/operators","slug":"/spec/operators/kubemanager","permalink":"/docs/v0.56.0/spec/operators/kubemanager","draft":false,"unlisted":false,"editUrl":"https://github.com/inspektor-gadget/inspektor-gadget/edit/main/versioned_docs/version-v0.56.0/spec/operators/kubemanager.md","tags":[],"version":"v0.56.0","frontMatter":{"title":"KubeManager"},"sidebar":"mainSidebar","previous":{"title":"KubeIPResolver","permalink":"/docs/v0.56.0/spec/operators/kubeipresolver"},"next":{"title":"KubeNameResolver","permalink":"/docs/v0.56.0/spec/operators/kubenameresolver"}}');var s=r(74848),o=r(28453);const i={title:"KubeManager"},t=void 0,c={},d=[{value:"Priority",id:"priority",level:2},{value:"Instance Parameters",id:"instance-parameters",level:2},{value:"<code>containername</code> / <code>k8s-containername</code>",id:"containername--k8s-containername",level:3},{value:"<code>podname</code> / <code>k8s-podname</code>",id:"podname--k8s-podname",level:3},{value:"<code>selector</code> / <code>k8s-selector</code>",id:"selector--k8s-selector",level:3},{value:"<code>namespace</code> / <code>k8s-namespace</code>
1",id:"namespace--k8s-namespace",level:3},{value:"<code>all-namespaces</code>",id:"all-namespaces",level:3},{value:"<code>runtime-containername</code>",id:"runtime-containername",level:3}];function l(e){const n={code:"code",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"The KubeManager operator is used when Inspektor Gadget is deployed to Kubernetes\nas a DaemonSet. This operator keeps track of the pods running on the node by\ntalking to the kube-apiserver and to the different container runtimes. This\noperator uses the pod informer and/or fanotify mechanisms to detect when\ncontainers are created. This information is used to:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Update the eBPF maps used to filter events in eBPF by Kubernetes concepts like\npod and container names, namespace, labels, etc."}),"\n",(0,s.jsx)(n.li,{children:"Enrich events with container information (see below)."}),"\n",(0,s.jsx)(n.li,{children:"Attach networking programs to specific containers according to the filtering\noptions passed by the user."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"This operator uses the mount or network namespace inode IDs to enrich events\nwith the following fields:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["k8s\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"node name"}),"\n",(0,s.jsx)(n.li,{children:"container name"}),"\n",(0,s.jsx)(n.li,{children:"pod name"}),"\n",(0,s.jsx)(n.li,{children:"namespace"}),"\n",(0,s.jsx)(n.li,{children:"pod labels"}),"\n",(0,s.jsx)(n.li,{children:"owner"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["runtime\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"runtime name"}),"\n",(0,s.jsx)(n.li,{children:"container name"}),"\n",(0,s.jsx)(n.li,{children:"container ID"}),"\n",(0,s.jsx)(n.li,{children:"container image name"}),"\n",(0,s.jsx)(n.li,{children:"container image digest"}),"\n",(0,s.jsx)(n.li,{children:"container started time"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"priority",children:"Priority"}),"\n",(0,s.jsx)(n.p,{children:"-1"}),"\n",(0,s.jsx)(n.h2,{id:"instance-parameters",children:"Instance Parameters"}),"\n",(0,s.jsxs)(n.h3,{id:"containername--k8s-containername",children:[(0,s.jsx)(n.code,{children:"containername"})," / ",(0,s.jsx)(n.code,{children:"k8s-containername"})]}),"\n",(0,s.jsx)(n.p,{children:"Show only data from containers with that name"}),"\n",(0,s.jsxs)(n.p,{children:["Fully qualified name: ",(0,s.jsx)(n.code,{children:"operator.KubeManager.containername"})," or ",(0,s.jsx)(n.code,{children:"operator.KubeManager.k8s-containername"})]}),"\n",(0,s.jsxs)(n.h3,{id:"podname--k8s-podname",children:[(0,s.jsx)(n.code,{children:"podname"})," / ",(0,s.jsx)(n.code,{children:"k8s-podname"})]}),"\n",(0,s.jsx)(n.p,{children:"Show only data from pods with that name"}),"\n",(0,s.jsxs)(n.p,{children:["Fully qualified name: ",(0,s.jsx)(n.code,{children:"operator.KubeManager.podname"})," or ",(0,s.jsx)(n.code,{children:"operator.KubeManager.k8s-podname"})]}),"\n",(0,s.jsxs)(n.h3,{id:"selector--k8s-selector",children:[(0,s.jsx)(n.code,{children:"selector"})," / ",(0,s.jsx)(n.code,{children:"k8s-selector"})]}),"\n",(0,s.jsx)(n.p,{children:"Kubernetes Labels selector to filter on. Only '=' is supported (e.g. key1=value1,key2=value2)"}),"\n",(0,s.jsxs)(n.p,{children:["Fully qualified name: ",(0,s.jsx)(n.code,{children:"operator.KubeManager.selector"})," / ",(0,s.jsx)(n.code,{children:"operator.KubeManager.k8s-selector"})]}),"\n",(0,s.jsxs)(n.h3,{id:"namespace--k8s-namespace",children:[(0,s.jsx)(n.code,{children:"namespace"})," / ",(0,s.jsx)(n.code,{children:"k8s-namespace"})]}),"\n",(0,s.jsx)(n.p,{children:"Show only data from pods in a given namespace"}),"\n",(0,s.jsxs)(n.p,{children:["Fully qualified name: ",(0,s.jsx)(n.code,{children:"operator.KubeManager.namespace"})," / ",(0,s.jsx)(n.code,{children:"operator.KubeManager.k8s-namespace"})]}),"\n",(0,s.jsx)(n.h3,{id:"all-namespaces",children:(0,s.jsx)(n.code,{children:"all-namespaces"})}),"\n",(0,s.jsx)(n.p,{children:"Show data from pods in all namespaces"}),"\n",(0,s.jsxs)(n.p,{children:["Fully qualified name: ",(0,s.jsx)(n.code,{children:"operator.KubeManager.all-namespaces"})]}
1),"\n",(0,s.jsx)(n.h3,{id:"runtime-containername",children:(0,s.jsx)(n.code,{children:"runtime-containername"})}),"\n",(0,s.jsx)(n.p,{children:"Show data only from containers with the runtime-assigned name (not the name defined in the pod spec)"}),"\n",(0,s.jsxs)(n.p,{children:["Fully qualified name: ",(0,s.jsx)(n.code,{children:"operator.KubeManager.runtime-containername"})]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>t});var a=r(96540);const s={},o=a.createContext(s);function i(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.