diff --git a/cluster/cluster.go b/cluster/cluster.go index 5574bc37..d311f2c7 100644 --- a/cluster/cluster.go +++ b/cluster/cluster.go @@ -305,12 +305,13 @@ func (c *Cluster) PrePullK8sImages(ctx context.Context) error { return nil } -func ConfigureCluster(ctx context.Context, rkeConfig v3.RancherKubernetesEngineConfig, crtBundle map[string]pki.CertificatePKI, clusterFilePath, configDir string, k8sWrapTransport k8s.WrapTransport) error { +func ConfigureCluster(ctx context.Context, rkeConfig v3.RancherKubernetesEngineConfig, crtBundle map[string]pki.CertificatePKI, clusterFilePath, configDir string, k8sWrapTransport k8s.WrapTransport, useKubectl bool) error { // dialer factories are not needed here since we are not uses docker only k8s jobs kubeCluster, err := ParseCluster(ctx, &rkeConfig, clusterFilePath, configDir, nil, nil, k8sWrapTransport) if err != nil { return err } + kubeCluster.UseKubectlDeploy = useKubectl if len(kubeCluster.ControlPlaneHosts) > 0 { kubeCluster.Certificates = crtBundle if err := kubeCluster.deployNetworkPlugin(ctx); err != nil { diff --git a/cmd/up.go b/cmd/up.go index ee4180b5..d3ac91ff 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -110,7 +110,7 @@ func ClusterUp( return APIURL, caCrt, clientCert, clientKey, err } - err = cluster.ConfigureCluster(ctx, kubeCluster.RancherKubernetesEngineConfig, kubeCluster.Certificates, clusterFilePath, configDir, k8sWrapTransport) + err = cluster.ConfigureCluster(ctx, kubeCluster.RancherKubernetesEngineConfig, kubeCluster.Certificates, clusterFilePath, configDir, k8sWrapTransport, false) if err != nil { return APIURL, caCrt, clientCert, clientKey, err }