src/exec
Exec
class Exec exec
Parameters
string namespace - The namespace of the pod to exec the command inside.
string podName - The name of the pod to exec the command inside.
string containerName - The name of the container in the pod to exec the command inside.
(string|string[]) command - The command or command and arguments to execute.
stream.Writable stdout - The stream to write stdout data from the command.
stream.Writable stderr - The stream to write stderr data from the command.
stream.Readable stdin - The stream to write stdin data into the command.
boolean tty - Should the command execute in a TTY enabled session.
(V1Status) => void statusCallback -
A callback to received the status (e.g. exit code) from the command, optional. returnPromisepublic async exec(
namespace: string, podName: string, containerName: string, command: string | string[], stdout: stream.Writable | null, stderr: stream.Writable | null, stdin: stream.Readable | null, tty: boolean, statusCallback?: (status: V1Status) => void, ): Promise<WebSocket.WebSocket>