Add ExecPod functions to execute commands in Kubernetes pods#1599
Merged
james00012 merged 2 commits intomainfrom Oct 15, 2025
Merged
Add ExecPod functions to execute commands in Kubernetes pods#1599james00012 merged 2 commits intomainfrom
james00012 merged 2 commits intomainfrom
Conversation
This adds ExecPod and ExecPodE helper functions to the k8s module that allow executing commands inside running pods, with optional container specification for multi-container pods. The implementation wraps kubectl exec and includes comprehensive tests verifying both single and multi-container scenarios.
denis256
reviewed
Oct 8, 2025
Add brief comments describing the purpose and usage of ExecPod and ExecPodE functions, following the style of other exported functions in the package. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
Should be good for review. Addressed your comment @denis256 |
denis256
approved these changes
Oct 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ExecPodandExecPodEhelper functions to thek8smoduleFixes #1598
Implementation Details
The new functions wrap
kubectl execand provide:ExecPod(t, options, podName, containerName, command...)- executes command and requires no errorExecPodE(t, options, podName, containerName, command...)- executes command and returns output and errorWhen
containerNameis empty, the command executes in the default container. When specified, it targets the specific container using the-cflag.Test Plan