Kubernetes Manager Pack
★Trustedv1.0.0MIT✔Verified88by AgentNode · published 22 days ago · toolpack
Manage Kubernetes pods, deployments, and services.
Interact with K8s clusters to list pods, scale deployments, view logs, and manage resources via the official kubernetes-client.
Quick Start
agentnode install kubernetes-manager-packUsage
From packagefrom kubernetes_manager_pack.tool import run
# List pods in the production namespace
result = run(
action="k8s_manage",
operation="list_pods",
namespace="production",
label_selector="app=api-gateway"
)
for pod in result["pods"]:
print(f"{pod['name']:45s} {pod['status']:12s} Restarts: {pod['restart_count']}")
# Get logs from a failing pod
failing_pods = [p for p in result["pods"] if p["status"] == "CrashLoopBackOff"]
if failing_pods:
logs = run(
action="k8s_manage",
operation="get_logs",
namespace="production",
pod_name=failing_pods[0]["name"],
tail_lines=50,
previous=True
)
print(f"\nLast 50 lines from crashed container:")
print(logs["log_output"])Environment Variables
KUBECONFIGPath to kubeconfig file (defaults to ~/.kube/config if not set)
Verification
Package installs and imports correctly. runtime checks passed.
This package was executed and validated by AgentNode before listing. Install, import, and runtime checks passed.
Last verified 18d ago· Runner v2.0.0
Use this when you need to...
- ›List and inspect pods across namespaces for health monitoring
- ›Scale deployments up or down based on traffic metrics
- ›View pod logs and diagnose CrashLoopBackOff errors
- ›Apply and roll back Kubernetes manifests for deployments
- ›Manage services, ingresses, and config maps programmatically
README
Kubernetes Manager Pack
Manage Kubernetes pods, deployments, and services. Full cluster management including pod inspection, scaling, log retrieval, and manifest application.
Quick Start
agentnode install kubernetes-manager-pack
from kubernetes_manager_pack.tool import run
result = run(
action="k8s_manage",
operation="list_pods",
namespace="default"
)
for pod in result["pods"]:
print(f"{pod['name']} — {pod['status']}")
Usage
Get Pod Logs
result = run(
action="k8s_manage",
operation="get_logs",
namespace="production",
pod_name="api-server-7b4f9c-xk2lm",
tail_lines=100
)
print(result["log_output"])
Scale a Deployment
run(
action="k8s_manage",
operation="scale_deployment",
namespace="production",
deployment="web-frontend",
replicas=3
)
Apply a Manifest
result = run(
action="k8s_manage",
operation="apply_manifest",
manifest_path="/data/k8s/deployment.yaml",
namespace="staging"
)
print(f"Applied: {result['kind']}/{result['name']}")
API Reference
| Capability | Description |
|---|---|
k8s_manage | Full Kubernetes cluster management via the API |
Operations: list_pods, get_logs, scale_deployment, rollout_status, apply_manifest, rollback, list_services, get_configmap, describe_pod
Requirements
| Variable | Required | Description |
|---|---|---|
KUBECONFIG | No | Path to kubeconfig file (defaults to ~/.kube/config) |
License
MIT
Version History
Capabilities
Permissions
This package declares the following access levels. Review before installing.
agentnode install kubernetes-manager-packEnvironment Variables
KUBECONFIGFiles (3)
License
MITStats
Compatibility
Frameworks
Runtime
pythonPython Version
>=3.10Trust & Security
Publisher
AgentNode
@agentnode