diff --git a/pkg/client/cluster.go b/pkg/client/cluster.go index ff2dacdf..ea7a2765 100644 --- a/pkg/client/cluster.go +++ b/pkg/client/cluster.go @@ -70,10 +70,6 @@ func ClusterRun(ctx context.Context, runtime k3drt.Runtime, clusterConfig *confi /* * Step 2: Pre-Start Configuration */ - _, err := EnsureToolsNode(ctx, runtime, &clusterConfig.Cluster) - if err != nil { - return fmt.Errorf("failed to ensure k3d-tools node: %w", err) - } envInfo, err := GatherEnvironmentInfo(ctx, runtime, &clusterConfig.Cluster) if err != nil { return fmt.Errorf("failed to gather environment information used for cluster creation: %w", err) diff --git a/pkg/client/environment.go b/pkg/client/environment.go index 1e0fe44e..2a82674d 100644 --- a/pkg/client/environment.go +++ b/pkg/client/environment.go @@ -25,12 +25,20 @@ import ( "context" "fmt" + l "github.com/rancher/k3d/v4/pkg/logger" "github.com/rancher/k3d/v4/pkg/runtimes" k3d "github.com/rancher/k3d/v4/pkg/types" ) func GatherEnvironmentInfo(ctx context.Context, runtime runtimes.Runtime, cluster *k3d.Cluster) (*k3d.EnvironmentInfo, error) { + l.Log().Infof("Using the k3d-tools node to gather environment information") + toolsNode, err := EnsureToolsNode(ctx, runtime, cluster) + if err != nil { + return nil, err + } + defer NodeDelete(ctx, runtime, toolsNode, k3d.NodeDeleteOpts{SkipLBUpdate: true}) + envInfo := &k3d.EnvironmentInfo{} hostIP, err := GetHostIP(ctx, runtime, cluster)