






// [23] Use the kubelet to run a command in every pod
ExecuteCodeOnKubelet(  , cmd     )


// [22] Use the kubelet to gain the token in every pod where we can run a command
GetTokensFromKubeletExec(  , &serviceAccounts)

    GetIPAddressesOfNodes
    foreach node

        pods = GetParsedPods(node)

        foreach pod in pods:
            output = run_command_via_kubelet(pod,cat_token)
            build_service_account(pod,output)


ExecuteCodeOnKubelet
    Enter a node IP or select one from GetIPAddressesOfNodes
        [1] All Nodes 
        [2] Enter Node IP address
        [2] Discover Node IP addresses and choose a node IP

    pods = GetParsedPods(node)
    
    ListPods (pods)
        [1] namespace1 - pod1 - container1 
        [2] namespace2 - pod2 - container2

    Enter a pod to run on or enter All

    Enter your command: user_command

    if choice == All    
        set_of_pods = pods
    else
        set_of_pods = choice

    for pod in set_of_pods:
        run_command_via_kubelet(pod,user_command)

