vcluster_call
Execute shell commands inside a running vcluster by connecting to the virtual cluster context, supporting optional namespace and kubeconfig.
Instructions
Execute a command inside a vcluster.
This function connects to a running vcluster and executes the given
command within the virtual cluster context. It uses vcluster connect
with the server-side flag to establish the connection and run the command.
Args:
name: The name of the vcluster to connect to and execute the command in.
command: The command string to execute inside the vcluster.
Supports standard shell quoting (e.g. "kubectl get pods -n default").
namespace: Optional namespace where the vcluster is located.
If not provided, defaults to vcluster-<name>.
kubeconfig_path: Optional path to a kubeconfig file. If not provided,
the default kubeconfig from the environment will be used.
Returns: Union[CommandResult, Dict[str, str], str]: CommandResult with exit code and output on success, or error object if failed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| command | Yes | ||
| namespace | No | ||
| kubeconfig_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |