Connect any Kubernetes cluster via kubeconfig so OpenSRE can investigate pods, deployments, and events
Overview
OpenSRE connects to Kubernetes using a standard kubeconfig. Works with any cluster — GKE, AKS, EKS, on-prem, kind, or minikube — without requiring AWS credentials or cloud-specific tooling.
Prerequisites
A kubeconfig file (typically ~/.kube/config) or its raw YAML content
Read access to the namespaces you want to investigate (get/list on pods, deployments, events, logs)
Setup
Option 1: Interactive CLI
opensre integrations setup kubernetes
The wizard will ask for:
kubeconfig — paste the raw kubeconfig YAML, or provide a file path that will be read and stored inline
Context — optional; leave blank to use the kubeconfig’s current context
Default namespace — defaults to default
Option 2: Environment variables
# Point to a kubeconfig fileKUBECONFIG=/home/user/.kube/config# Or provide the raw YAML directly (useful in CI / Docker)KUBECONFIG_CONTENT="$(cat ~/.kube/config)"# Optional overridesKUBECONFIG_CONTEXT=my-contextKUBECONFIG_NAMESPACE=productionKUBECONFIG_NAMESPACES=production,staging
Option 3: Persistent store
Store an active kubernetes record in ~/.opensre/integrations.json with kubeconfig content (or path resolved into content by setup), plus optional context, namespace, and allowed_namespaces list.
Credentials
Field
Environment variable
Default
Description
kubeconfig
KUBECONFIG_CONTENT or read from KUBECONFIG
—
Raw kubeconfig YAML (required)
context
KUBECONFIG_CONTEXT
current context
Kubeconfig context to activate
namespace
KUBECONFIG_NAMESPACE
default
Default namespace for tool queries
allowed_namespaces
KUBECONFIG_NAMESPACES
only namespace
Comma-separated extra namespaces the agent may target; namespace is always allowed
Namespace allowlist
Namespace-scoped tools accept a namespace argument, so the agent can move between namespaces during an investigation. Which namespaces it can reach is set by the operator:
With KUBECONFIG_NAMESPACES unset, the agent can only reach KUBECONFIG_NAMESPACE, the same as before.
With KUBECONFIG_NAMESPACES=production,staging, the agent can target either namespace. KUBECONFIG_NAMESPACE is always allowed, and calls that omit a namespace still use it.
Any other namespace is refused before the cluster is contacted, with namespace "<name>" is not in the configured allowlist (allowed: ...).
The allowlist is enforced by OpenSRE on top of RBAC and is not a substitute for it. A service account with cluster-wide read access is still limited to the listed namespaces. Cluster-scoped lookups (kubernetes_list_nodes, and kubernetes_get_resource for nodes) are not affected.The kubeconfig’s service account or user needs these Kubernetes RBAC permissions:
List pods in a namespace with phase, readiness, and restart counts
kubernetes_get_pod_logs
Fetch recent log lines from a pod container
kubernetes_list_deployments
List deployments with desired/ready/available replica counts
kubernetes_get_events
List cluster events — crash loops, OOM kills, scheduling failures
kubernetes_describe_pod
Fetch full spec, status, and container states for a single pod
kubernetes_list_nodes
List cluster nodes with conditions, capacity, and allocatable resources
kubernetes_list_services
List services with their type, clusterIP, ports, and selector
kubernetes_list_statefulsets
List StatefulSets with desired/ready/current/updated replica counts
kubernetes_list_daemonsets
List DaemonSets with desired/current/ready/available counts
kubernetes_list_ingresses
List Ingress resources with routing rules, host→service path mappings, and TLS config
kubernetes_list_configmaps
List ConfigMaps with their key-value data
kubernetes_get_resource
Fetch a single named resource by type and name (pods, deployments, statefulsets, daemonsets, services, ingresses, configmaps, replicasets, pvcs, nodes)
Example: investigating a crash-looping pod
> What's wrong with the payments-api pod in the production namespace?
OpenSRE will:
Call kubernetes_list_pods scoped to production to find pods with high restart counts
Call kubernetes_get_pod_logs to read recent container output
Call kubernetes_get_events with involvedObject.name=payments-api to surface Warning events
Correlate the evidence into a root-cause summary
Local verification recipe
Verified all 12 registered tools live against a real local kind cluster with a
representative workload — a Deployment, StatefulSet, DaemonSet, Service, Ingress,
ConfigMap, and a deliberately crash-looping bare pod.
The bare pod’s apply can fail on the first attempt with error looking up service account demo/default: serviceaccount "default" not found — the Namespace’s default
ServiceAccount is created asynchronously by a controller shortly after the Namespace
itself, so a Pod in the same kubectl apply batch can race it. Retrying the whole
apply (already-created objects are simply reported unchanged) is simpler than adding
a separate wait step, and resolves on the very next attempt once the ServiceAccount
controller catches up.
opensre integrations verify checks a saved store record before env vars, and
chat sessions only fall through to env vars when the store has no records at
all — any existing record, for any service, blocks env-var resolution entirely. Point
OPENSRE_INTEGRATIONS_STORE_PATH at a path inside a fresh empty directory before
verifying, so a real saved record can’t shadow the KUBECONFIG_* vars above, and your
real config is never read or written:
SERVICE │ SOURCE │ STATUS │ DETAILkubernetes │ local env │ ✓ passed │ Connected to Kubernetes cluster │ │ │ namespace 'demo' accessible (1 pod(s) │ │ │ visible).
Now ask the agent about the crash-looping pod:
opensre
Ask: Why is the demo-crashloop pod in the demo namespace crash-looping?Against this exact local cluster the agent lists pods, describes demo-crashloop,
pulls its events and logs, and finds the hardcoded exit 1 in the container command.
All 12 registered tools were confirmed to return real data against this cluster.Teardown:
A successful verification lists the namespaces visible to the configured credentials.Inside the REPL: /integrations verify kubernetes or /verify kubernetes.
Troubleshooting
Symptom
Fix
Status: missing
Run opensre integrations setup kubernetes or set KUBECONFIG / KUBECONFIG_CONTENT
Unauthorized / Forbidden
Confirm the kubeconfig user/service account has the RBAC verbs listed under Credentials
Wrong cluster or namespace
Set KUBECONFIG_CONTEXT and KUBECONFIG_NAMESPACE, or re-run setup
namespace "..." is not in the configured allowlist
Configuration, not RBAC: add the namespace to KUBECONFIG_NAMESPACES
Cannot reach API server
Check VPN / network path to the cluster endpoint in the kubeconfig
Security
Prefer a dedicated read-only service account or user for OpenSRE.
Store kubeconfig material in the integration store or a secret manager — not in source control.
Scope RBAC to the namespaces you want investigated (get / list only).
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OpenSRE Documentation","colors":{"primary":"#000000","light":"#FFFFFF","dark":"#000000"},"logo":{"light":"https://mintcdn.com/tracer/rmdYtNSoc9Q5D-5B/images/opensre-logo-black.svg?fit=max\u0026auto=format\u0026n=rmdYtNSoc9Q5D-5B\u0026q=85\u0026s=7ea8db5a1f8e1665db7544632022e298","dark":"https://mintcdn.com/tracer/rmdYtNSoc9Q5D-5B/images/opensre-logo-white.svg?fit=max\u0026auto=format\u0026n=rmdYtNSoc9Q5D-5B\u0026q=85\u0026s=cb153f8bae517d3cea2b823ad2e51327"},"favicon":"https://mintcdn.com/tracer/iKd9uDADI-KBLmoJ/favicon.ico?fit=max\u0026auto=format\u0026n=iKd9uDADI-KBLmoJ\u0026q=85\u0026s=cf78c0f1195ee204bf1022d69a921204","navbar":{"links":[{"icon":"discord","href":"https://discord.gg/opensre","label":"Discord"},{"icon":"box","href":"https://github.com/Tracer-Cloud/opensre/releases","label":"Releases"},{"icon":"github","href":"https://github.com/Tracer-Cloud/opensre","label":"GitHub"}]},"footer":{"socials":{"website":"https://www.opensre.com","github":"https://github.com/Tracer-Cloud/opensre","linkedin":"https://linkedin.com/company/tracercloud","discord":"https://discord.gg/opensre"}},"seo":{"metatags":{},"indexing":"all"},"integrations":{"hotjar":{"hjid":"6568352","hjsv":"6"},"posthog":{"apiKey":"phc_zutpVhmQw7oUmMkbawKNdYCKQWjpfASATtf5ywB75W2","apiHost":"https://us.i.posthog.com","sessionRecording":true}},"contextual":{"options":[],"display":"header"},"interaction":{"drilldown":false},"styling":{"latex":false},"navigation":{"directory":"card","pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tracer","hasAudioNarration":false,"actualSubdomain":"tracer","customDomains":["opensre.com"],"gitSource":{"type":"github","owner":"tracer-cloud","repo":"opensre","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af6ff5886fb40a3af476362","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Integrations","count":82},{"language":"default","tag":"Monitoring","count":16},{"language":"default","tag":"Databases","count":14},{"language":"default","tag":"Cloud","count":12},{"language":"default","tag":"Code and CI","count":12},{"language":"default","tag":"Get started","count":10},{"language":"default","tag":"Platform","count":10},{"language":"default","tag":"Messaging","count":9},{"language":"default","tag":"Incidents","count":8},{"language":"default","tag":"Workflows","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":false},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","href":"/docs/_mintlify/custom/tracer/e149abf61f8236b2/custom.css"},{"filePath":"sidebar.css","content":":root{--opensre-sidebar-muted: #737373;--opensre-sidebar-link: #a3a3a3;--opensre-sidebar-link-hover: #e5e5e5;--opensre-sidebar-active-bg: rgba(255, 255, 255, 0.08)}:root:not(.dark){--opensre-sidebar-muted: #a3a3a3;--opensre-sidebar-link: #525252;--opensre-sidebar-link-hover: #171717;--opensre-sidebar-active-bg: rgba(0, 0, 0, 0.06)}#sidebar .sidebar-group-header,#sidebar .sidebar-group-header h5,#sidebar [class*=\"sidebar-group-header\"],#sidebar [class*=\"SidebarGroup\"]>:first-child,#navigation-items .sidebar-group-header,#navigation-items .sidebar-group-header h5,#navigation-items [class*=\"sidebar-group-header\"]{font-family:\"Britti Sans Trial\", sans-serif!important;font-size:11px!important;font-weight:600!important;letter-spacing:0.08em!important;text-transform:uppercase!important;line-height:1.4!important;color:var(--opensre-sidebar-muted)!important;margin-top:1.25rem!important;margin-bottom:0.35rem!important;padding-top:0.25rem!important}#sidebar .sidebar-group:first-child .sidebar-group-header,#sidebar nav>.sidebar-group:first-child .sidebar-group-header,#navigation-items .sidebar-group:first-child .sidebar-group-header{margin-top:0.25rem!important}#sidebar a:not([href*=\"sign-up\"]),#navigation-items a:not([href*=\"sign-up\"]){font-family:\"Britti Sans Trial\", sans-serif!important;font-size:14px!important;font-weight:400!important;letter-spacing:normal!important;color:var(--opensre-sidebar-link)!important;border-radius:0.375rem!important}#sidebar a:not([href*=\"sign-up\"]):hover,#navigation-items a:not([href*=\"sign-up\"]):hover{color:var(--opensre-sidebar-link-hover)!important}#sidebar a[aria-current=\"page\"],#sidebar a[data-active=\"true\"],#sidebar [data-active=\"true\"]>a,#sidebar li[data-active=\"true\"]>a,#sidebar a.active,#navigation-items a[aria-current=\"page\"],#navigation-items a[data-active=\"true\"],#navigation-items [data-active=\"true\"]>a,#navigation-items li[data-active=\"true\"]>a,#navigation-items a.active{color:#ffffff!important;background:var(--opensre-sidebar-active-bg)!important;font-weight:500!important}:root:not(.dark) #sidebar a[aria-current=\"page\"],:root:not(.dark) #sidebar a[data-active=\"true\"],:root:not(.dark) #sidebar [data-active=\"true\"]>a,:root:not(.dark) #sidebar li[data-active=\"true\"]>a,:root:not(.dark) #sidebar a.active,:root:not(.dark) #navigation-items a[aria-current=\"page\"],:root:not(.dark) #navigation-items a[data-active=\"true\"],:root:not(.dark) #navigation-items [data-active=\"true\"]>a,:root:not(.dark) #navigation-items li[data-active=\"true\"]>a,:root:not(.dark) #navigation-items a.active{color:#171717!important}header img[src*=\"Tracer-Head-Black.png\"],header img[src*=\"Tracer-Head-White.png\"],nav img[src*=\"Tracer-Head-Black.png\"],nav img[src*=\"Tracer-Head-White.png\"]{width:1rem!important;height:1rem!important;object-fit:contain!important}html.dark img[src*=\"Tracer-Head-Black.png\"]{filter:brightness(0) invert(1)!important}.toc-custom-actions{margin-top:0.75rem;padding-top:0.75rem;border-top:1px solid rgba(0, 0, 0, 0.1)}html.dark .toc-custom-actions{border-top-color:rgba(255, 255, 255, 0.1)}.toc-custom-action{display:flex;align-items:center;gap:0.5rem;padding-left:0.25rem;font-size:0.875rem;line-height:1.75rem;color:inherit}.toc-custom-action span{display:inline-block}#table-of-contents-content,[data-testid=\"table-of-contents\"],nav[aria-label*=\"Table of contents\"],[class*=\"table-of-contents\"]{padding-left:0!important}#table-of-contents-content ul,[data-testid=\"table-of-contents\"] ul,nav[aria-label*=\"Table of contents\"] ul,[class*=\"table-of-contents\"] ul{padding-left:0!important;margin-left:0!important}#table-of-contents-content a,[data-testid=\"table-of-contents\"] a,nav[aria-label*=\"Table of contents\"] a,[class*=\"table-of-contents\"] a{padding-left:0.25rem!important;margin-left:0!important}[class*=\"right-sidebar\"] #table-of-contents-content,[class*=\"right-sidebar\"] [data-testid=\"table-of-contents\"],[class*=\"right-sidebar\"] nav[aria-label*=\"Table of contents\"],[class*=\"right-sidebar\"] [class*=\"table-of-contents\"]{text-align:left!important;align-items:flex-start!important;justify-content:flex-start!important}[class*=\"right-sidebar\"] #table-of-contents-content a,[class*=\"right-sidebar\"] [data-testid=\"table-of-contents\"] a,[class*=\"right-sidebar\"] nav[aria-label*=\"Table of contents\"] a,[class*=\"right-sidebar\"] [class*=\"table-of-contents\"] a{display:block!important;width:100%!important;text-align:left!important}"}],"page":{"pagePath":"integrations/cloud/kubernetes","slug":"/integrations/cloud/kubernetes","pageMetadata":{"title":"Kubernetes","description":"Connect any Kubernetes cluster via kubeconfig so OpenSRE can investigate pods, deployments, and events","href":"/integrations/cloud/kubernetes"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Connect any Kubernetes cluster via kubeconfig so OpenSRE can investigate pods, deployments, and events\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`OpenSRE connects to Kubernetes using a standard kubeconfig. Works with any cluster — GKE, AKS, EKS, on-prem, kind, or minikube — without requiring AWS credentials or cloud-specific tooling.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A kubeconfig file (typically `,_jsx(_components.code,{children:`~/.kube/config`}),`) or its raw YAML content`]}),`\n`,_jsxs(_components.li,{children:[`Read access to the namespaces you want to investigate (`,_jsx(_components.code,{children:`get`}),`/`,_jsx(_components.code,{children:`list`}),` on pods, deployments, events, logs)`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`setup`,children:`Setup`}),`\n`,_jsx(Heading,{level:`3`,id:`option-1-interactive-cli`,children:`Option 1: Interactive CLI`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`opensre`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` integrations`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` setup`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kubernetes`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The wizard will ask for:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`kubeconfig`}),` — paste the raw kubeconfig YAML, or provide a file path that will be read and stored inline`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Context`}),` — optional; leave blank to use the kubeconfig’s current context`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Default namespace`}),` — defaults to `,_jsx(_components.code,{children:`default`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`option-2-environment-variables`,children:`Option 2: Environment variables`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Point to a kubeconfig file`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`KUBECONFIG`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/home/user/.kube/config`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Or provide the raw YAML directly (useful in CI / Docker)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`KUBECONFIG_CONTENT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cat`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/.kube/config)\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Optional overrides`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`KUBECONFIG_CONTEXT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`my-context`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`KUBECONFIG_NAMESPACE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`production`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`KUBECONFIG_NAMESPACES`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`production,staging`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`option-3-persistent-store`,children:`Option 3: Persistent store`}),`\n`,_jsxs(_components.p,{children:[`Store an active `,_jsx(_components.code,{children:`kubernetes`}),` record in `,_jsx(_components.code,{children:`~/.opensre/integrations.json`}),` with kubeconfig content (or path resolved into content by setup), plus optional context, namespace, and `,_jsx(_components.code,{children:`allowed_namespaces`}),` list.`]}),`\n`,_jsx(Heading,{level:`2`,id:`credentials`,children:`Credentials`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Environment variable`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubeconfig`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`KUBECONFIG_CONTENT`}),` or read from `,_jsx(_components.code,{children:`KUBECONFIG`})]}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Raw kubeconfig YAML (required)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`context`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`KUBECONFIG_CONTEXT`})}),_jsx(_components.td,{children:`current context`}),_jsx(_components.td,{children:`Kubeconfig context to activate`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`namespace`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`KUBECONFIG_NAMESPACE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`default`})}),_jsx(_components.td,{children:`Default namespace for tool queries`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`allowed_namespaces`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`KUBECONFIG_NAMESPACES`})}),_jsxs(_components.td,{children:[`only `,_jsx(_components.code,{children:`namespace`})]}),_jsxs(_components.td,{children:[`Comma-separated extra namespaces the agent may target; `,_jsx(_components.code,{children:`namespace`}),` is always allowed`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`namespace-allowlist`,children:`Namespace allowlist`}),`\n`,_jsxs(_components.p,{children:[`Namespace-scoped tools accept a `,_jsx(_components.code,{children:`namespace`}),` argument, so the agent can move between namespaces during an investigation. Which namespaces it can reach is set by the operator:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`With `,_jsx(_components.code,{children:`KUBECONFIG_NAMESPACES`}),` unset, the agent can only reach `,_jsx(_components.code,{children:`KUBECONFIG_NAMESPACE`}),`, the same as before.`]}),`\n`,_jsxs(_components.li,{children:[`With `,_jsx(_components.code,{children:`KUBECONFIG_NAMESPACES=production,staging`}),`, the agent can target either namespace. `,_jsx(_components.code,{children:`KUBECONFIG_NAMESPACE`}),` is always allowed, and calls that omit a namespace still use it.`]}),`\n`,_jsxs(_components.li,{children:[`Any other namespace is refused before the cluster is contacted, with `,_jsx(_components.code,{children:`namespace \"\u003cname>\" is not in the configured allowlist (allowed: ...)`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The allowlist is enforced by OpenSRE on top of RBAC and is not a substitute for it. A service account with cluster-wide read access is still limited to the listed namespaces. Cluster-scoped lookups (`,_jsx(_components.code,{children:`kubernetes_list_nodes`}),`, and `,_jsx(_components.code,{children:`kubernetes_get_resource`}),` for nodes) are not affected.`]}),`\n`,_jsx(_components.p,{children:`The kubeconfig’s service account or user needs these Kubernetes RBAC permissions:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`rules`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`apiGroups`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` resources`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pods\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pods/log\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"events\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"namespaces\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"nodes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"services\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"configmaps\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"persistentvolumeclaims\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` verbs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"get\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"list\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`apiGroups`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"apps\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` resources`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"deployments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"statefulsets\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"daemonsets\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"replicasets\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` verbs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"get\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"list\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`apiGroups`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"networking.k8s.io\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` resources`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ingresses\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` verbs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"get\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"list\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`tools`,children:`Tools`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tool`}),_jsx(_components.th,{children:`What it does`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_list_pods`})}),_jsx(_components.td,{children:`List pods in a namespace with phase, readiness, and restart counts`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_get_pod_logs`})}),_jsx(_components.td,{children:`Fetch recent log lines from a pod container`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_list_deployments`})}),_jsx(_components.td,{children:`List deployments with desired/ready/available replica counts`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_get_events`})}),_jsx(_components.td,{children:`List cluster events — crash loops, OOM kills, scheduling failures`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_describe_pod`})}),_jsx(_components.td,{children:`Fetch full spec, status, and container states for a single pod`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_list_nodes`})}),_jsx(_components.td,{children:`List cluster nodes with conditions, capacity, and allocatable resources`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_list_services`})}),_jsx(_components.td,{children:`List services with their type, clusterIP, ports, and selector`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_list_statefulsets`})}),_jsx(_components.td,{children:`List StatefulSets with desired/ready/current/updated replica counts`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_list_daemonsets`})}),_jsx(_components.td,{children:`List DaemonSets with desired/current/ready/available counts`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_list_ingresses`})}),_jsx(_components.td,{children:`List Ingress resources with routing rules, host→service path mappings, and TLS config`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_list_configmaps`})}),_jsx(_components.td,{children:`List ConfigMaps with their key-value data`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kubernetes_get_resource`})}),_jsx(_components.td,{children:`Fetch a single named resource by type and name (pods, deployments, statefulsets, daemonsets, services, ingresses, configmaps, replicasets, pvcs, nodes)`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`example-investigating-a-crash-looping-pod`,children:`Example: investigating a crash-looping pod`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> What's wrong with the payments-api pod in the production namespace?`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`OpenSRE will:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Call `,_jsx(_components.code,{children:`kubernetes_list_pods`}),` scoped to `,_jsx(_components.code,{children:`production`}),` to find pods with high restart counts`]}),`\n`,_jsxs(_components.li,{children:[`Call `,_jsx(_components.code,{children:`kubernetes_get_pod_logs`}),` to read recent container output`]}),`\n`,_jsxs(_components.li,{children:[`Call `,_jsx(_components.code,{children:`kubernetes_get_events`}),` with `,_jsx(_components.code,{children:`involvedObject.name=payments-api`}),` to surface Warning events`]}),`\n`,_jsx(_components.li,{children:`Correlate the evidence into a root-cause summary`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`local-verification-recipe`,children:`Local verification recipe`}),`\n`,_jsxs(_components.p,{children:[`Verified all 12 registered tools live against a real local `,_jsx(_components.code,{children:`kind`}),` cluster with a\nrepresentative workload — a Deployment, StatefulSet, DaemonSet, Service, Ingress,\nConfigMap, and a deliberately crash-looping bare pod.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`115`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`115`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`kind`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` cluster`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` opensre-k8s-demo`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cat`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /tmp/k8s-demo-workload.yaml`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 'YAML'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`apiVersion: v1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`kind: Namespace`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` name: demo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`apiVersion: v1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`kind: ConfigMap`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` name: demo-config`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` namespace: demo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`data:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` APP_MODE: \"verify\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`apiVersion: apps/v1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`kind: Deployment`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` name: demo-web`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` namespace: demo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`spec:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` replicas: 2`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` selector:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` matchLabels: {app: demo-web}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` template:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` labels: {app: demo-web}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` spec:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` containers:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - name: nginx`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` image: nginx:alpine`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`apiVersion: apps/v1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`kind: StatefulSet`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` name: demo-cache`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` namespace: demo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`spec:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` serviceName: demo-cache`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` replicas: 1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` selector:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` matchLabels: {app: demo-cache}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` template:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` labels: {app: demo-cache}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` spec:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` containers:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - name: redis`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` image: redis:alpine`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`apiVersion: apps/v1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`kind: DaemonSet`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` name: demo-agent`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` namespace: demo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`spec:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` selector:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` matchLabels: {app: demo-agent}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` template:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` labels: {app: demo-agent}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` spec:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` containers:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - name: agent`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` image: busybox`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` command: [\"sh\", \"-c\", \"while true; do sleep 3600; done\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`apiVersion: v1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`kind: Service`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` name: demo-web`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` namespace: demo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`spec:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` selector: {app: demo-web}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ports:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - {port: 80, targetPort: 80}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`apiVersion: networking.k8s.io/v1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`kind: Ingress`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` name: demo-ingress`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` namespace: demo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`spec:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rules:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - host: demo.local`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` paths:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - path: /`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pathType: Prefix`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` backend:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` service: {name: demo-web, port: {number: 80}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`apiVersion: v1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`kind: Pod`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`metadata:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` name: demo-crashloop`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` namespace: demo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`spec:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` restartPolicy: Always`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` containers:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - name: crasher`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` image: busybox`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` command: [\"sh\", \"-c\", \"echo 'payment-service: connection refused to billing-api'; exit 1\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`YAML`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`0`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`until`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` kubectl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /tmp/k8s-demo-workload.yaml`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`do`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -ge`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]; `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`then`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` echo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"workload apply never succeeded; check: kubectl get events -n demo\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >\u00262`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` break`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` fi`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` sleep`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`done`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The bare pod’s `,_jsx(_components.code,{children:`apply`}),` can fail on the first attempt with `,_jsx(_components.code,{children:`error looking up service account demo/default: serviceaccount \"default\" not found`}),` — the Namespace’s default\nServiceAccount is created asynchronously by a controller shortly after the Namespace\nitself, so a Pod in the same `,_jsx(_components.code,{children:`kubectl apply`}),` batch can race it. Retrying the whole\napply (already-created objects are simply reported `,_jsx(_components.code,{children:`unchanged`}),`) is simpler than adding\na separate wait step, and resolves on the very next attempt once the ServiceAccount\ncontroller catches up.`]})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` KUBECONFIG_CONTENT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cat`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/.kube/config)\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` KUBECONFIG_CONTEXT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"kind-opensre-k8s-demo\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` KUBECONFIG_NAMESPACE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"demo\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`opensre integrations verify`}),` checks a saved store record before env vars, and\nchat sessions only fall through to env vars when the store has no records at\nall — any existing record, for any service, blocks env-var resolution entirely. Point\n`,_jsx(_components.code,{children:`OPENSRE_INTEGRATIONS_STORE_PATH`}),` at a path inside a fresh empty directory before\nverifying, so a real saved record can’t shadow the `,_jsx(_components.code,{children:`KUBECONFIG_*`}),` vars above, and your\nreal config is never read or written:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OPENSRE_DEMO_STORE_DIR`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`mktemp`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /tmp/opensre-k8s-demo.XXXXXX)\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OPENSRE_INTEGRATIONS_STORE_PATH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$OPENSRE_DEMO_STORE_DIR`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/integrations.json\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Verify:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`opensre`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` integrations`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` verify`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kubernetes`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`SERVICE │ SOURCE │ STATUS │ DETAIL`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`kubernetes │ local env │ ✓ passed │ Connected to Kubernetes cluster`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ │ │ namespace 'demo' accessible (1 pod(s)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ │ │ visible).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Now ask the agent about the crash-looping pod:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`opensre`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Ask: `,_jsx(_components.em,{children:`Why is the demo-crashloop pod in the demo namespace crash-looping?`})]}),`\n`,_jsxs(_components.p,{children:[`Against this exact local cluster the agent lists pods, describes `,_jsx(_components.code,{children:`demo-crashloop`}),`,\npulls its events and logs, and finds the hardcoded `,_jsx(_components.code,{children:`exit 1`}),` in the container command.\nAll 12 registered tools were confirmed to return real data against this cluster.`]}),`\n`,_jsx(_components.p,{children:`Teardown:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`kind`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` delete`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` cluster`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` opensre-k8s-demo`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`rm`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -rf`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$OPENSRE_DEMO_STORE_DIR`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`unset`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` OPENSRE_DEMO_STORE_DIR`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` OPENSRE_INTEGRATIONS_STORE_PATH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` KUBECONFIG_CONTENT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` KUBECONFIG_CONTEXT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` KUBECONFIG_NAMESPACE`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`verify`,children:`Verify`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`opensre`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` integrations`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` verify`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kubernetes`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A successful verification lists the namespaces visible to the configured credentials.`}),`\n`,_jsxs(_components.p,{children:[`Inside the REPL: `,_jsx(_components.code,{children:`/integrations verify kubernetes`}),` or `,_jsx(_components.code,{children:`/verify kubernetes`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Symptom`}),_jsx(_components.th,{children:`Fix`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Status: missing`})}),_jsxs(_components.td,{children:[`Run `,_jsx(_components.code,{children:`opensre integrations setup kubernetes`}),` or set `,_jsx(_components.code,{children:`KUBECONFIG`}),` / `,_jsx(_components.code,{children:`KUBECONFIG_CONTENT`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Unauthorized / Forbidden`})}),_jsx(_components.td,{children:`Confirm the kubeconfig user/service account has the RBAC verbs listed under Credentials`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Wrong cluster or namespace`})}),_jsxs(_components.td,{children:[`Set `,_jsx(_components.code,{children:`KUBECONFIG_CONTEXT`}),` and `,_jsx(_components.code,{children:`KUBECONFIG_NAMESPACE`}),`, or re-run setup`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:_jsx(_components.code,{children:`namespace \"...\" is not in the configured allowlist`})})}),_jsxs(_components.td,{children:[`Configuration, not RBAC: add the namespace to `,_jsx(_components.code,{children:`KUBECONFIG_NAMESPACES`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Cannot reach API server`})}),_jsx(_components.td,{children:`Check VPN / network path to the cluster endpoint in the kubeconfig`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`security`,children:`Security`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Prefer a dedicated read-only service account or user for OpenSRE.`}),`\n`,_jsx(_components.li,{children:`Store kubeconfig material in the integration store or a secret manager — not in source control.`}),`\n`,_jsxs(_components.li,{children:[`Scope RBAC to the namespaces you want investigated (`,_jsx(_components.code,{children:`get`}),` / `,_jsx(_components.code,{children:`list`}),` only).`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Kubernetes","description":"Connect any Kubernetes cluster via kubeconfig so OpenSRE can investigate pods, deployments, and events","href":"/integrations/cloud/kubernetes"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Setup","slug":"setup","depth":2,"children":[{"title":"Option 1: Interactive CLI","slug":"option-1-interactive-cli","depth":3,"children":[]},{"title":"Option 2: Environment variables","slug":"option-2-environment-variables","depth":3,"children":[]},{"title":"Option 3: Persistent store","slug":"option-3-persistent-store","depth":3,"children":[]}]},{"title":"Credentials","slug":"credentials","depth":2,"children":[{"title":"Namespace allowlist","slug":"namespace-allowlist","depth":3,"children":[]}]},{"title":"Tools","slug":"tools","depth":2,"children":[{"title":"Example: investigating a crash-looping pod","slug":"example-investigating-a-crash-looping-pod","depth":3,"children":[]},{"title":"Local verification recipe","slug":"local-verification-recipe","depth":3,"children":[]}]},{"title":"Verify","slug":"verify","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"Security","slug":"security","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/tracer/3640b424f7229c9e/toc-actions.js","/docs/_mintlify/custom/tracer/3efb8263c18eafe6/public/radar-chart.js"],"subdomain":"tracer","siteName":"OpenSRE Documentation","title":"Kubernetes - OpenSRE Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T12:15:24.518Z","originalFileLocation":"integrations/cloud/kubernetes.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Connect any Kubernetes cluster via kubeconfig so OpenSRE can investigate pods, deployments, and events\">\u003cmeta data-mint-head name=\"application-name\" content=\"OpenSRE Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracer/YbZGPFHeNcvj92i8/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracer/YbZGPFHeNcvj92i8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracer/YbZGPFHeNcvj92i8/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracer/YbZGPFHeNcvj92i8/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracer/YbZGPFHeNcvj92i8/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracer/YbZGPFHeNcvj92i8/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracer/YbZGPFHeNcvj92i8/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracer/YbZGPFHeNcvj92i8/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracer/YbZGPFHeNcvj92i8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Kubernetes - OpenSRE Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Connect any Kubernetes cluster via kubeconfig so OpenSRE can investigate pods, deployments, and events\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OpenSRE Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://opensre.com/docs/integrations/cloud/kubernetes\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tracer.mintlify.site/docs/_mintlify/api/og/v2?division=Cloud\u0026amp;title=Kubernetes\u0026amp;description=Connect+any+Kubernetes+cluster+via+kubeconfig+so+OpenSRE+can+investigate+pods%2C+deployments%2C+and+events\u0026amp;theme=1e2e4f76867419b3a580ed7c\u0026amp;signature=580d3c78fd8cc01a5c12bb83f65b022a4f5697f7a0f599ed9732959b548e904e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Kubernetes - OpenSRE Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Connect any Kubernetes cluster via kubeconfig so OpenSRE can investigate pods, deployments, and events\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tracer.mintlify.site/docs/_mintlify/api/og/v2?division=Cloud\u0026amp;title=Kubernetes\u0026amp;description=Connect+any+Kubernetes+cluster+via+kubeconfig+so+OpenSRE+can+investigate+pods%2C+deployments%2C+and+events\u0026amp;theme=1e2e4f76867419b3a580ed7c\u0026amp;signature=580d3c78fd8cc01a5c12bb83f65b022a4f5697f7a0f599ed9732959b548e904e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/tracer/YbZGPFHeNcvj92i8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OpenSRE Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://opensre.com/docs/integrations/cloud/kubernetes\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/integrations/cloud/kubernetes.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://opensre.com/#organization\",\"name\":\"OpenSRE Documentation\",\"url\":\"https://opensre.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tracer/rmdYtNSoc9Q5D-5B/images/opensre-logo-black.svg?fit=max\u0026auto=format\u0026n=rmdYtNSoc9Q5D-5B\u0026q=85\u0026s=7ea8db5a1f8e1665db7544632022e298\"}},{\"@type\":\"WebSite\",\"@id\":\"https://opensre.com/docs#website\",\"name\":\"OpenSRE Documentation\",\"url\":\"https://opensre.com/docs\",\"publisher\":{\"@id\":\"https://opensre.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://opensre.com/docs/integrations/cloud/kubernetes#webpage\",\"url\":\"https://opensre.com/docs/integrations/cloud/kubernetes\",\"name\":\"Kubernetes\",\"description\":\"Connect any Kubernetes cluster via kubeconfig so OpenSRE can investigate pods, deployments, and events\",\"dateModified\":\"2026-11-13T12:15:24.518Z\",\"isPartOf\":{\"@id\":\"https://opensre.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://opensre.com/docs/integrations/cloud/kubernetes#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://opensre.com/docs/integrations/cloud/kubernetes#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrations\",\"item\":\"https://opensre.com/docs/integrations\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cloud\",\"item\":\"https://opensre.com/docs/integrations/cloud/argocd\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Kubernetes\",\"item\":\"https://opensre.com/docs/integrations/cloud/kubernetes\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://opensre.com/docs/integrations/cloud/kubernetes#article\",\"headline\":\"Kubernetes\",\"name\":\"Kubernetes\",\"description\":\"Connect any Kubernetes cluster via kubeconfig so OpenSRE can investigate pods, deployments, and events\",\"url\":\"https://opensre.com/docs/integrations/cloud/kubernetes\",\"mainEntityOfPage\":{\"@id\":\"https://opensre.com/docs/integrations/cloud/kubernetes#webpage\"},\"dateModified\":\"2026-11-13T12:15:24.518Z\",\"publisher\":{\"@id\":\"https://opensre.com/#organization\"},\"isPartOf\":{\"@id\":\"https://opensre.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OpenSRE Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"OpenSRE Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/integrations/cloud/kubernetes.md","siteName":"OpenSRE Documentation","nav":{"global":null,"directory":"card","groups":[{"group":"Welcome","pages":[{"title":"Welcome to OpenSRE","href":"/index"},{"title":"Showcase","href":"/getting-started/showcase"},{"title":"Features","href":"/getting-started/features"},{"title":"FAQ","href":"/guides/faq"}]},{"group":"Get started","pages":[{"title":"Quickstart","href":"/getting-started/quickstart"},{"title":"Install OpenSRE","href":"/install/index"},{"title":"Local and on-prem setup","href":"/install/install-local"},{"title":"Enterprise setup (OpenSRE Cloud)","href":"/install/install-enterprise"},{"group":"Platforms","expanded":false,"pages":[{"title":"macOS","href":"/install/macos"},{"title":"Linux","href":"/install/linux-local"},{"title":"Windows","href":"/install/windows-local"},{"title":"Docker","href":"/install/docker"}]},{"title":"Environment Variables","href":"/install/environment-variables"},{"title":"Sync to your own object store","href":"/install/remote-sync"}]},{"group":"CI/CD","pages":[{"title":"CI/CD with OpenSRE","href":"/cicd/overview"},{"title":"CI/CD analytics demo","href":"/cicd/cicd-analytics-demo"},{"title":"Fix GitHub CI","href":"/cicd/github-ci-fix"},{"title":"Keep CI green with an agent","href":"/cicd/ci-repair-agent"},{"title":"Scan CI health across repositories","href":"/cicd/github-ci-health-scan"}]},{"group":"Using the shell","pages":[{"title":"Shell commands","href":"/getting-started/interactive-shell-commands"},{"title":"Agent with connected tools","href":"/getting-started/interactive-shell-assistant"},{"title":"Goals","href":"/getting-started/goals"}]},{"group":"Guides","pages":[{"title":"OTel payment auto-triage pilot","href":"/guides/otel-payment-triage"}]},{"group":"Run it anywhere","pages":[{"title":"Deployment","href":"/guides/deployment"},{"title":"Headless CLI","href":"/guides/headless-cli"},{"title":"HTTP API","href":"/guides/api"},{"title":"Python API","href":"/guides/python-api"},{"title":"Hosting the Agent","href":"/guides/hosting-the-agent"}]},{"group":"Platform","pages":[{"title":"LLM Providers","href":"/platform/llm-providers"},{"title":"Multi-instance integrations","href":"/platform/multi-instance-integrations"},{"title":"Masking Sensitive Identifiers","href":"/platform/masking"},{"title":"Interactive Shell Privacy","href":"/platform/interactive-shell-privacy"},{"title":"Session History","href":"/platform/sessions"},{"title":"Principal-scoped storage (Slack and Discord)","href":"/platform/principal-scoped-storage"},{"title":"Long-Term Memory","href":"/platform/memory"},{"title":"Work Management","href":"/platform/work-management"},{"title":"Scheduled Deliveries (Cron)","href":"/platform/cron"},{"title":"Closed-Loop Learning","href":"/platform/closed-loop-learning"}]},{"group":"Integrations","pages":[{"title":"Integrations overview","href":"/integrations/index"},{"group":"Monitoring","expanded":false,"pages":[{"title":"Azure Monitor","href":"/integrations/monitoring/azure-monitor"},{"title":"Better Stack Telemetry","href":"/integrations/monitoring/betterstack"},{"title":"Coralogix","href":"/integrations/monitoring/coralogix"},{"title":"Datadog","href":"/integrations/monitoring/datadog"},{"title":"Grafana","href":"/integrations/monitoring/grafana"},{"title":"Grafana Annotations","href":"/integrations/monitoring/grafana_annotations"},{"title":"groundcover","href":"/integrations/monitoring/groundcover"},{"title":"Honeycomb","href":"/integrations/monitoring/honeycomb"},{"title":"New Relic","href":"/integrations/monitoring/new_relic"},{"title":"OpenObserve","href":"/integrations/monitoring/openobserve"},{"title":"PostHog","href":"/integrations/monitoring/posthog"},{"title":"PostHog (MCP)","href":"/integrations/monitoring/posthog-mcp"},{"title":"SigNoz","href":"/integrations/monitoring/signoz"},{"title":"Splunk","href":"/integrations/monitoring/splunk"},{"title":"Grafana Tempo","href":"/integrations/monitoring/tempo"},{"title":"VictoriaLogs","href":"/integrations/monitoring/victoria_logs"}]},{"group":"Incidents","expanded":false,"pages":[{"title":"Alertmanager","href":"/integrations/incidents/alertmanager"},{"title":"Runbook-guided investigations","href":"/integrations/incidents/runbook-guided-investigations"},{"title":"incident.io","href":"/integrations/incidents/incident_io"},{"title":"PagerDuty","href":"/integrations/incidents/pagerduty"},{"title":"Sentry","href":"/integrations/incidents/sentry"},{"title":"Sentry (MCP)","href":"/integrations/incidents/sentry-mcp"},{"title":"ServiceNow","href":"/integrations/incidents/servicenow"},{"title":"Fix a Sentry issue","href":"/integrations/incidents/fix-sentry-issue"}]},{"group":"Cloud","expanded":false,"pages":[{"title":"Argo CD","href":"/integrations/cloud/argocd"},{"title":"AWS","href":"/integrations/cloud/aws"},{"title":"AWS Lambda","href":"/integrations/cloud/aws_lambda"},{"title":"AWS CloudTrail","href":"/integrations/cloud/cloudtrail_events"},{"title":"AWS EC2","href":"/integrations/cloud/ec2"},{"title":"AWS ELB","href":"/integrations/cloud/elb"},{"title":"Helm (CLI)","description":"Connect Helm 3 so OpenSRE can list releases, inspect status and history, and read rendered values and manifests","href":"/integrations/cloud/helm"},{"title":"Kubernetes","href":"/integrations/cloud/kubernetes"},{"title":"Railway","description":"Configure Railway deployment inspection","href":"/integrations/cloud/railway"},{"title":"AWS S3","href":"/integrations/cloud/s3"},{"title":"AWS SQS","href":"/integrations/cloud/sqs_queues"},{"title":"Vercel","href":"/integrations/cloud/vercel"}]},{"group":"Code and CI","expanded":false,"pages":[{"title":"Architecture audit tool","href":"/integrations/code/architecture-audit-tool"},{"title":"Structured file reads","href":"/integrations/code/structured-file-tool"},{"title":"Counting files","href":"/integrations/code/counting-files"},{"title":"Bitbucket","href":"/integrations/code/bitbucket"},{"title":"GitHub","href":"/integrations/code/github"},{"title":"Fix GitHub security and quality findings","href":"/integrations/code/github-security-fix"},{"title":"Resolve merge conflicts","href":"/integrations/code/resolve-merge-conflicts"},{"title":"GitHub workflow tools","href":"/integrations/code/github-workflow-tools"},{"title":"GitHub Actions","href":"/integrations/code/github-actions"},{"title":"GitLab","href":"/integrations/code/gitlab"},{"title":"Jenkins","href":"/integrations/code/jenkins"},{"title":"Pi coding tasks","href":"/integrations/code/pi-coding"}]},{"group":"Collaboration","expanded":false,"pages":[{"title":"Google Docs","href":"/integrations/collaboration/google-docs"},{"title":"Jira","href":"/integrations/collaboration/jira"},{"title":"Pipedream","href":"/integrations/collaboration/pipedream"},{"title":"Trello","href":"/integrations/collaboration/trello"}]},{"group":"Messaging","expanded":false,"pages":[{"title":"Messaging","href":"/integrations/messaging/index"},{"title":"SMTP","href":"/integrations/messaging/smtp"},{"title":"Buzz","href":"/integrations/messaging/buzz"},{"title":"Slack","href":"/integrations/messaging/slack"},{"title":"Discord","href":"/integrations/messaging/discord"},{"title":"Telegram","href":"/integrations/messaging/telegram"},{"title":"Rocket.Chat","href":"/integrations/messaging/rocketchat"},{"title":"WhatsApp","href":"/integrations/messaging/whatsapp"},{"title":"Twilio SMS","href":"/integrations/messaging/twilio-sms"}]},{"group":"Databases","expanded":false,"pages":[{"title":"Azure SQL","href":"/integrations/databases/azure-sql"},{"title":"ClickHouse","href":"/integrations/databases/clickhouse"},{"title":"AWS Elasticsearch (AWS ES)","href":"/integrations/databases/elasticsearch"},{"title":"MariaDB","href":"/integrations/databases/mariadb"},{"title":"MongoDB","href":"/integrations/databases/mongodb"},{"title":"MongoDB Atlas","href":"/integrations/databases/mongodb-atlas"},{"title":"MySQL","href":"/integrations/databases/mysql"},{"title":"Neon","href":"/integrations/databases/neon"},{"title":"OpenSearch / Elasticsearch","href":"/integrations/databases/opensearch"},{"title":"PostgreSQL","href":"/integrations/databases/postgresql"},{"title":"AWS RDS","href":"/integrations/databases/rds"},{"title":"Redis","href":"/integrations/databases/redis"},{"title":"Snowflake","href":"/integrations/databases/snowflake"},{"title":"Supabase","href":"/integrations/databases/supabase"}]},{"group":"Workflows","expanded":false,"pages":[{"title":"Airflow","href":"/integrations/workflows/airflow"},{"title":"Dagster","href":"/integrations/workflows/dagster"},{"title":"Kafka","href":"/integrations/workflows/kafka"},{"title":"Prefect","href":"/integrations/workflows/prefect"},{"title":"RabbitMQ","href":"/integrations/workflows/rabbitmq"},{"title":"Temporal","href":"/integrations/workflows/temporal"}]}]},{"group":"Community","pages":[{"title":"Community Giveaway","href":"/guides/bi-weekly-giveaway"},{"title":"Pull request review flow","href":"/guides/pr-review-flow"}]}]},"basePath":"","title":"Kubernetes - OpenSRE Documentation","buildId":"dpl_Aw98ji4XvBsgtZwL1VrkUF9ehFqz","deploymentId":"dpl_Aw98ji4XvBsgtZwL1VrkUF9ehFqz","dynamics":[],"chunks":[]}