k8s-tool
k8s-tool (Kubernetes)
Kubernetes tool — kubectl wrapper with config-driven context resolution and structured commands. Part of @blogic-cz/agent-tools.
How to Run
Run via bun k8s-tool (requires @blogic-cz/agent-tools as a dev dependency).
NEVER run bare kubectl — the credential guard will block it.
Auth: existing kubectl context (kubeconfig). Cluster ID from config resolves context automatically.
Commands
bun k8s-tool kubectl --env test --cmd "get pods -n test-ns"
bun k8s-tool kubectl --env prod --cmd "logs <pod> --tail=100"
bun k8s-tool kubectl --env test --cmd "describe pod <pod>"
bun k8s-tool pods --env test # List pods (structured)
bun k8s-tool logs --pod <pod> --env test --tail 50 # Fetch logs
bun k8s-tool describe --resource pod --name <pod> --env test
bun k8s-tool exec --pod <pod> --exec-cmd "ls -la" --env test
bun k8s-tool top --env test # Show resource usage
Environment is any string (e.g. test, prod). Set defaultEnvironment in agent-tools.json5 to skip --env on every call. Implicit production access is blocked for safety.
Tips
- Use
--helpon any subcommand for full options. - Error responses include
hint,nextCommand, andretryablefields — always check them on failure. - Prefer CLI tool over MCP tools — more efficient, doesn't load extra context.
More from blogic-cz/agent-tools
git-workflow
Automates the full PR lifecycle — create or update a pull request, then aggressively monitor CI checks and review feedback in a continuous loop, fixing failures and addressing comments until the PR is fully green. Also covers push, branch creation, and branch sync workflows.
60update-packages
This skill should be used when upgrading dependencies, bumping packages, resolving outdated dependencies, or performing dependency updates. It guides safe Bun-based package upgrades with breaking-change handling, runtime pin alignment, and grouped version coordination.
40code-review
This skill should be used when running a code review or pre-PR review in template-ts repositories. It provides a severity-based checklist for architecture, security, performance, and testing quality gates.
40testing-patterns
This skill should be used when implementing or reviewing testing workflows in template-ts projects, especially for testing, Vitest, Playwright, integration test, and mocking scenarios.
36tdd
This skill should be used when a task explicitly asks for TDD, test-first development, or the Red-Green-Refactor cycle. It guides incremental implementation with concrete Red-Green-Refactor examples, including Effect service patterns with mock layers.
31debugging-with-opensrc
Load this skill when debugging behavior in external libraries by reading local OpenSrc mirrors (Effect, TanStack, TRPC, Drizzle, Better Auth, Sentry, Pino), or when docs conflict with runtime behavior and source-level verification is required.
29