{"id":47707434,"url":"https://github.com/soyvural/kubectl-ro","last_synced_at":"2026-04-02T18:03:28.512Z","repository":{"id":347796471,"uuid":"1195278196","full_name":"soyvural/kubectl-ro","owner":"soyvural","description":"Read-only Kubernetes access for AI agents and humans. kubectl wrapper + MCP server that blocks mutations and redacts secrets.","archived":false,"fork":false,"pushed_at":"2026-03-29T14:14:58.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-29T17:33:06.307Z","etag":null,"topics":["ai-agents","cloud-native","devops","krew","kubectl","kubectl-plugin","kubernetes","llm","mcp","mcp-server","read-only","security"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soyvural.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit/audit.go","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-29T13:23:42.000Z","updated_at":"2026-03-29T14:12:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/soyvural/kubectl-ro","commit_stats":null,"previous_names":["soyvural/kubectl-ro"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/soyvural/kubectl-ro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soyvural%2Fkubectl-ro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soyvural%2Fkubectl-ro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soyvural%2Fkubectl-ro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soyvural%2Fkubectl-ro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soyvural","download_url":"https://codeload.github.com/soyvural/kubectl-ro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soyvural%2Fkubectl-ro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31312744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","cloud-native","devops","krew","kubectl","kubectl-plugin","kubernetes","llm","mcp","mcp-server","read-only","security"],"created_at":"2026-04-02T18:02:43.641Z","updated_at":"2026-04-02T18:03:28.504Z","avatar_url":"https://github.com/soyvural.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubectl-ro\n\n[![CI](https://github.com/soyvural/kubectl-ro/actions/workflows/ci.yaml/badge.svg)](https://github.com/soyvural/kubectl-ro/actions/workflows/ci.yaml)\n[![Go Version](https://img.shields.io/badge/Go-1.25-00ADD8?logo=go\u0026logoColor=white)](https://go.dev)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![GoDoc](https://img.shields.io/badge/GoDoc-reference-00ADD8?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/soyvural/kubectl-ro)\n[![MCP](https://img.shields.io/badge/MCP-Compatible-8A2BE2?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJ3aGl0ZSI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiLz48L3N2Zz4=)](https://modelcontextprotocol.io)\n[![Kubernetes](https://img.shields.io/badge/Kubernetes-Read--Only-326CE5?logo=kubernetes\u0026logoColor=white)](https://kubernetes.io)\n[![Go Report Card](https://goreportcard.com/badge/github.com/soyvural/kubectl-ro)](https://goreportcard.com/report/github.com/soyvural/kubectl-ro)\n\nRead-only Kubernetes access for AI agents and humans.\n\nWhen you let an LLM explore your cluster, you don't want it running `kubectl delete` or leaking your secrets. `kubectl-ro` prevents that.\n\n## Build\n\n```bash\ngit clone https://github.com/soyvural/kubectl-ro.git\ncd kubectl-ro\ngo build -o kubectl-ro .\n```\n\nOr install directly:\n\n```bash\ngo install github.com/soyvural/kubectl-ro@latest\n```\n\n## Run\n\n### 1. As a kubectl wrapper\n\n```bash\n# allowed\nkubectl-ro get pods -n kube-system\nkubectl-ro logs deployment/my-app --tail=100\nkubectl-ro describe svc my-service\n\n# blocked\nkubectl-ro delete pod nginx          # BLOCKED: 'delete' is a mutating command\nkubectl-ro get secret -o yaml        # BLOCKED: would expose secret values\nkubectl-ro exec -it pod -- bash      # BLOCKED: 'exec' is a mutating command\n```\n\n### 2. As an MCP server for AI\n\nStart the server:\n\n```bash\nkubectl-ro serve\n```\n\nOr add to Claude Code settings (`.claude/settings.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"kubectl-ro\": {\n      \"command\": \"kubectl-ro\",\n      \"args\": [\"serve\"]\n    }\n  }\n}\n```\n\nThis gives AI agents 20 read-only tools: `list_pods`, `list_deployments`, `get_pod_logs`, `list_secrets`, etc. All secrets are redacted automatically.\n\n### 3. As a kubectl plugin\n\nIf `kubectl-ro` is on your PATH:\n\n```bash\nkubectl ro get pods\nkubectl ro describe svc my-service\n```\n\n## Test\n\n```bash\ngo test ./... -v -race\n```\n\n## What gets blocked\n\nAll mutating commands: `delete`, `apply`, `create`, `edit`, `patch`, `exec`, `scale`, `drain`, `cordon`, `label`, `annotate`, and more.\n\nSecret values are protected. `get secrets` (table output) is allowed, but `-o yaml`, `-o json`, and `describe secret` are blocked because they expose base64-encoded values. In MCP mode, secret values are replaced with `[REDACTED]`.\n\n## Audit log\n\nEvery operation is logged to `~/.kubectl-ro/audit.log`:\n\n```json\n{\"timestamp\":\"2026-03-29T13:04:36Z\",\"interface\":\"wrapper\",\"action\":\"get pods\",\"result\":\"allowed\"}\n{\"timestamp\":\"2026-03-29T13:04:36Z\",\"interface\":\"wrapper\",\"action\":\"delete pod x\",\"result\":\"blocked\",\"reason\":\"'delete' is a mutating command\"}\n```\n\nOverride with `KUBECTL_RO_AUDIT_LOG` env var.\n\n## Verify without executing\n\n```bash\nkubectl-ro --check get pods           # prints: OK\nkubectl-ro --check delete pod nginx   # prints: BLOCKED: 'delete' is a mutating command\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoyvural%2Fkubectl-ro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoyvural%2Fkubectl-ro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoyvural%2Fkubectl-ro/lists"}