diff --git a/src/Repositories/PodRepository.php b/src/Repositories/PodRepository.php index 9de59e0..2e306e4 100644 --- a/src/Repositories/PodRepository.php +++ b/src/Repositories/PodRepository.php @@ -25,4 +25,18 @@ public function logs(Pod $pod, array $options = []) return $response; } + + /** + * Execute a command on a pod. + * + * @param \Maclof\Kubernetes\Models\Pod $pod + * @param array $options + * @return string + */ + public function exec(Pod $pod, array $options = []) + { + $response = $this->client->sendRequest('GET', '/' . $this->uri . '/' . $pod->getMetadata('name') . '/exec', $options); + + return $response; + } }