diff --git a/pkg/cmd/debug/debug.go b/pkg/cmd/debug/debug.go index 046ea1d4..f4b4b6b3 100644 --- a/pkg/cmd/debug/debug.go +++ b/pkg/cmd/debug/debug.go @@ -802,7 +802,7 @@ func (o *DebugOptions) handleAttachPod(ctx context.Context, f cmdutil.Factory, n } if err := opts.Run(); err != nil { - fmt.Fprintf(opts.ErrOut, "Error attaching, falling back to logs: %v\n", err) + fmt.Fprintf(opts.ErrOut, "warning: couldn't attach to pod/%s, falling back to streaming logs: %v\n", podName, err) return logOpts(f, pod, opts) } return nil diff --git a/pkg/cmd/run/run.go b/pkg/cmd/run/run.go index 73656aa2..dd154ce2 100644 --- a/pkg/cmd/run/run.go +++ b/pkg/cmd/run/run.go @@ -486,7 +486,7 @@ func handleAttachPod(f cmdutil.Factory, podClient corev1client.PodsGetter, ns, n } if err := opts.Run(); err != nil { - fmt.Fprintf(opts.ErrOut, "Error attaching, falling back to logs: %v\n", err) + fmt.Fprintf(opts.ErrOut, "warning: couldn't attach to pod/%s, falling back to streaming logs: %v\n", name, err) return logOpts(f, pod, opts) } return nil