|
1 | 1 | # Troubleshoot Running Pods
|
2 | 2 |
|
3 |
| -[bit.ly/k8s-pod-troubleshooting](bit.ly/k8s-pod-troubleshooting) |
| 3 | +* Status: Pending |
| 4 | +* Version: Alpha |
| 5 | +* Implementation Owner: @verb |
4 | 6 |
|
5 | 7 | This proposal seeks to add first class support for troubleshooting by creating a
|
6 | 8 | mechanism to execute a shell or other troubleshooting tools inside a running pod
|
@@ -116,20 +118,22 @@ fields required for creating a Debug Container:
|
116 | 118 | // PodExecOptions is the query options to a Pod's remote exec call
|
117 | 119 | type PodExecOptions struct {
|
118 | 120 | ...
|
119 |
| - // DebugName is the name of the Debug Container. Its presence will cause |
120 |
| - // exec to create a Debug Container rather than performing a runtime exec. |
121 |
| - DebugName string `json:"debugName,omitempty" ...` |
122 |
| - // Image is an optional container image name that will be used to for the Debug |
123 |
| - // Container in the specified Pod with Command as ENTRYPOINT. If omitted a |
124 |
| - // default image will be used. |
125 |
| - Image string `json:"image,omitempty" ...` |
| 121 | + // EphemeralContainerName is the name of an ephemeral container in which the |
| 122 | + // command ought to be run. Either both EphemeralContainerName and |
| 123 | + // EphemeralContainerImage fields must be set, or neither. |
| 124 | + EphemeralContainerName *string `json:"ephemeralContainerName,omitempty" ...` |
| 125 | +
|
| 126 | + // EphemeralContainerImage is the image of an ephemeral container in which the command |
| 127 | + // ought to be run. Either both EphemeralContainerName and EphemeralContainerImage |
| 128 | + // fields must be set, or neither. |
| 129 | + EphemeralContainerImage *string `json:"ephemeralContainerImage,omitempty" ...` |
126 | 130 | }
|
127 | 131 | ```
|
128 | 132 |
|
129 | 133 | After creating the Debug Container, the kubelet will upgrade the connection to
|
130 | 134 | streaming and perform an attach to the container's console. If disconnected, the
|
131 | 135 | Debug Container can be reattached using the pod's `/attach` endpoint with
|
132 |
| -`DebugName`. |
| 136 | +`EphemeralContainerName`. |
133 | 137 |
|
134 | 138 | Debug Containers cannot be removed via the API and instead the process must
|
135 | 139 | terminate. While not ideal, this parallels existing behavior of `kubectl exec`.
|
|
0 commit comments