mirror of https://github.com/k3s-io/k3s
Fix session ended hint for kubectl run
parent
ed87db5040
commit
fe4b16c8aa
|
@ -343,6 +343,7 @@ func handleAttachPod(f *cmdutil.Factory, c *client.Client, pod *api.Pod, opts *A
|
||||||
opts.Client = c
|
opts.Client = c
|
||||||
opts.PodName = pod.Name
|
opts.PodName = pod.Name
|
||||||
opts.Namespace = pod.Namespace
|
opts.Namespace = pod.Namespace
|
||||||
|
opts.CommandName = "kubectl attach"
|
||||||
if err := opts.Run(); err != nil {
|
if err := opts.Run(); err != nil {
|
||||||
fmt.Fprintf(opts.Out, "Error attaching, falling back to logs: %v\n", err)
|
fmt.Fprintf(opts.Out, "Error attaching, falling back to logs: %v\n", err)
|
||||||
req, err := f.LogsForObject(pod, &api.PodLogOptions{Container: opts.GetContainerName(pod)})
|
req, err := f.LogsForObject(pod, &api.PodLogOptions{Container: opts.GetContainerName(pod)})
|
||||||
|
|
Loading…
Reference in New Issue