diff --git a/pkg/handler/connect.go b/pkg/handler/connect.go index 7aa8338ff..c77cdd3b3 100644 --- a/pkg/handler/connect.go +++ b/pkg/handler/connect.go @@ -942,11 +942,18 @@ func SshJump(ctx context.Context, conf *util.SshConfig, flags *pflag.FlagSet, pr return } if print { - log.Infof("using temp kubeconfig %s", temp.Name()) + msg := fmt.Sprintf("| To use: export KUBECONFIG=%s |", temp.Name()) + printLine(msg) + log.Infof(msg) + printLine(msg) } path = temp.Name() return } +func printLine(msg string) { + line := "+" + strings.Repeat("-", len(msg)-2) + "+" + log.Infof(line) +} func SshJumpAndSetEnv(ctx context.Context, conf *util.SshConfig, flags *pflag.FlagSet, print bool) error { if conf.Addr == "" && conf.ConfigAlias == "" {