Class Exec
java.lang.Object
de.predic8.kubernetesclient.patch.Exec
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExecute a command in a container.Execute a command in a container.exec(io.kubernetes.client.openapi.models.V1Pod pod, String[] command, String container, boolean stdin, boolean tty) Execute a command in a container.Execute a command in a container.Execute a command in a container.Execute a command in a container.io.kubernetes.client.openapi.ApiClientGet the API client for these exec operations.voidsetApiClient(io.kubernetes.client.openapi.ApiClient apiClient) Set the API client for subsequent exec operations.
-
Constructor Details
-
Exec
public Exec()Simple Exec API constructor, uses default configuration -
Exec
public Exec(io.kubernetes.client.openapi.ApiClient apiClient) Exec API Constructor- Parameters:
apiClient- The api client to use.
-
-
Method Details
-
getApiClient
public io.kubernetes.client.openapi.ApiClient getApiClient()Get the API client for these exec operations.- Returns:
- The API client that will be used.
-
setApiClient
public void setApiClient(io.kubernetes.client.openapi.ApiClient apiClient) Set the API client for subsequent exec operations.- Parameters:
apiClient- The new API client to use.
-
exec
public Process exec(String namespace, String name, String[] command, boolean stdin) throws io.kubernetes.client.openapi.ApiException, IOException Execute a command in a container. If there are multiple containers in the pod, uses the first container in the Pod.- Parameters:
namespace- The namespace of the Podname- The name of the Podcommand- The command to runstdin- If true, pass a stdin stream into the container- Throws:
io.kubernetes.client.openapi.ApiExceptionIOException
-
exec
public Process exec(io.kubernetes.client.openapi.models.V1Pod pod, String[] command, boolean stdin) throws io.kubernetes.client.openapi.ApiException, IOException Execute a command in a container. If there are multiple containers in the pod, uses the first container in the Pod.- Parameters:
pod- The pod where the command is run.command- The command to runstdin- If true, pass a stdin stream into the container- Throws:
io.kubernetes.client.openapi.ApiExceptionIOException
-
exec
public Process exec(String namespace, String name, String[] command, boolean stdin, boolean tty) throws io.kubernetes.client.openapi.ApiException, IOException Execute a command in a container. If there are multiple containers in the pod, uses the first container in the Pod.- Parameters:
namespace- The namespace of the Podname- The name of the Podcommand- The command to runstdin- If true, pass a stdin stream into the containertty- If true, stdin is a tty.- Throws:
io.kubernetes.client.openapi.ApiExceptionIOException
-
exec
public Process exec(io.kubernetes.client.openapi.models.V1Pod pod, String[] command, boolean stdin, boolean tty) throws io.kubernetes.client.openapi.ApiException, IOException Execute a command in a container. If there are multiple containers in the pod, uses the first container in the Pod.- Parameters:
pod- The pod where the command is run.command- The command to runstdin- If true, pass a stdin stream into the containertty- If true, stdin is a tty.- Throws:
io.kubernetes.client.openapi.ApiExceptionIOException
-
exec
public Process exec(io.kubernetes.client.openapi.models.V1Pod pod, String[] command, String container, boolean stdin, boolean tty) throws io.kubernetes.client.openapi.ApiException, IOException Execute a command in a container. If there are multiple containers in the pod, uses the first container in the Pod.- Parameters:
pod- The pod where the command is run.command- The command to runcontainer- The container in the Pod where the command is run.stdin- If true, pass a stdin stream into the container.tty- If true, stdin is a TTY (only applies if stdin is true)- Throws:
io.kubernetes.client.openapi.ApiExceptionIOException
-
exec
public Process exec(String namespace, String name, String[] command, String container, boolean stdin, boolean tty) throws io.kubernetes.client.openapi.ApiException, IOException Execute a command in a container. If there are multiple containers in the pod, uses the first container in the Pod.- Parameters:
namespace- The namespace of the Podname- The name of the Podcommand- The command to runcontainer- The container in the Pod where the command is run.stdin- If true, pass a stdin stream into the container.tty- If true, stdin is a TTY (only applies if stdin is true)- Throws:
io.kubernetes.client.openapi.ApiExceptionIOException
-