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/liston pods, deployments, events, logs)
Setup
Option 1: Interactive CLI
- 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
Option 3: Persistent store
Store an activekubernetes record in ~/.opensre/integrations.json with kubeconfig content (or path resolved into content by setup), plus optional context and namespace.
Credentials
The kubeconfig’s service account or user needs these Kubernetes RBAC permissions:
Investigation tools
Example: investigating a crash-looping pod
- Call
kubernetes_list_podsscoped toproductionto find pods with high restart counts - Call
kubernetes_get_pod_logsto read recent container output - Call
kubernetes_get_eventswithinvolvedObject.name=payments-apito surface Warning events - Correlate the evidence into a root-cause summary
Local verification recipe
Verified all 12 registered tools live against a real localkind cluster with a
representative workload — a Deployment, StatefulSet, DaemonSet, Service, Ingress,
ConfigMap, and a deliberately crash-looping bare pod.
opensre integrations verify checks a saved store record before env vars, and
opensre investigate only falls 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 for either
command, and your real config is never read or written:
kubernetes_get_pod_logs, kubernetes_list_nodes) were confirmed separately via direct
tool calls, both returning real data.
Teardown:
Verify
/integrations verify kubernetes or /verify kubernetes.
Troubleshooting
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/listonly).