INNER CODE UNIT · Python

run_kubectl_command

IBM/AutoMLPipeline.jl · argo-workflow/agents/argo-k8s.py:146

def run_kubectl_command(command: str):
    """
    Execute any kubectl command with full privileges (use with caution).

    This tool allows execution of any kubectl command, including potentially
    destructive operations like delete, update, patch, apply, etc. It provides
    complete access to your Kubernetes cluster with the same permissions as
    your kubectl configuration.

    WARNING: This tool can perform destructive operations. Use run_kubectl_command_ro()
    for safe, read-only operations when you only need to gather information.

    Args:
        command (str): The complete kubectl command to execute. Must start with "kubectl".
                      Examples: "kubectl delete pod nginx", "kubectl apply -f config.yaml"

    Returns:
        str: The stdout output from the kubectl command, or an error message if the

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…