From 139319725ff828d0e771becb2ea7f332dfb3b19a Mon Sep 17 00:00:00 2001 From: rick <1450685+LinuxSuRen@users.noreply.github.com> Date: Thu, 14 Apr 2022 16:39:51 +0800 Subject: [PATCH] Print the free port when install with k3d --- kubectl-plugin/install/k3d.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kubectl-plugin/install/k3d.go b/kubectl-plugin/install/k3d.go index ae96fe9..e3f587e 100644 --- a/kubectl-plugin/install/k3d.go +++ b/kubectl-plugin/install/k3d.go @@ -146,7 +146,9 @@ func (o *k3dOption) runE(cmd *cobra.Command, args []string) (err error) { if o.printCommand { fmt.Println("k3d", k3dArgs) } - err = common.ExecCommand("k3d", k3dArgs...) + if err = common.ExecCommand("k3d", k3dArgs...); err == nil { + cmd.Println("Now, you can visit your cluster with these ports:", ports) + } return }