exec_pod_command
Execute commands inside a Kubernetes pod by providing pod name and command, with optional namespace, container, and cluster settings for precise targeting.
Instructions
在Pod中执行命令
Args: pod_name: Pod名称 command: 要执行的命令列表,如 ["ls", "-la"] namespace: Kubernetes命名空间,默认为default container: 容器名称,如果Pod有多个容器则需要指定 kubeconfig_path: kubeconfig 文件路径,不指定则使用 cluster_name 或默认集群 cluster_name: 集群配置名称(clusters.json 中的 name),kubeconfig_path 未指定时使用
Returns: 命令执行结果
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| pod_name | Yes | ||
| container | No | ||
| namespace | No | default | |
| cluster_name | No | ||
| kubeconfig_path | No |