Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose a feature to troubleshoot running pods #649

Merged
merged 6 commits into from
Sep 27, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Name PodExecOptions fields as recommended by API reviewer
  • Loading branch information
verb committed Sep 27, 2017
commit 473c49d6cb75aa8f9fe3017bada74fe69206e18e
22 changes: 13 additions & 9 deletions contributors/design-proposals/node/troubleshoot-running-pods.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Troubleshoot Running Pods

[bit.ly/k8s-pod-troubleshooting](bit.ly/k8s-pod-troubleshooting)
* Status: Pending
* Version: Alpha
* Implementation Owner: @verb

This proposal seeks to add first class support for troubleshooting by creating a
mechanism to execute a shell or other troubleshooting tools inside a running pod
Expand Down Expand Up @@ -116,20 +118,22 @@ fields required for creating a Debug Container:
// PodExecOptions is the query options to a Pod's remote exec call
type PodExecOptions struct {
...
// DebugName is the name of the Debug Container. Its presence will cause
// exec to create a Debug Container rather than performing a runtime exec.
DebugName string `json:"debugName,omitempty" ...`
// Image is an optional container image name that will be used to for the Debug
// Container in the specified Pod with Command as ENTRYPOINT. If omitted a
// default image will be used.
Image string `json:"image,omitempty" ...`
// EphemeralContainerName is the name of an ephemeral container in which the
// command ought to be run. Either both EphemeralContainerName and
// EphemeralContainerImage fields must be set, or neither.
EphemeralContainerName *string `json:"ephemeralContainerName,omitempty" ...`

// EphemeralContainerImage is the image of an ephemeral container in which the command
// ought to be run. Either both EphemeralContainerName and EphemeralContainerImage
// fields must be set, or neither.
EphemeralContainerImage *string `json:"ephemeralContainerImage,omitempty" ...`
}
```

After creating the Debug Container, the kubelet will upgrade the connection to
streaming and perform an attach to the container's console. If disconnected, the
Debug Container can be reattached using the pod's `/attach` endpoint with
`DebugName`.
`EphemeralContainerName`.

Debug Containers cannot be removed via the API and instead the process must
terminate. While not ideal, this parallels existing behavior of `kubectl exec`.
Expand Down