diff --git a/pkg/cluster/base.go b/pkg/cluster/base.go index 57187e13..34e8448d 100644 --- a/pkg/cluster/base.go +++ b/pkg/cluster/base.go @@ -428,6 +428,10 @@ func (p *ProviderBase) InitCluster(options interface{}, deployPlugins func() []s } } + if _, err := p.execute(&c.MasterNodes[0], []string{fmt.Sprintf("mkdir -p %s", common.K3sManifestsDir)}...); err != nil { + return err + } + if deployPlugins != nil { // install additional manifests to the current cluster. extraManifests := deployPlugins() diff --git a/pkg/common/common.go b/pkg/common/common.go index 1aba6588..dc54a9d4 100644 --- a/pkg/common/common.go +++ b/pkg/common/common.go @@ -16,7 +16,7 @@ const ( // KubeCfgTempName default temp kube config file name prefix. KubeCfgTempName = "autok3s-temp-*" // K3sManifestsDir k3s manifests dir. - K3sManifestsDir = "/var/lib/rancher/k3s/server/manifests" + K3sManifestsDir = "/var/lib/rancher/k3s/server/manifests/autok3s" // MasterInstanceName master instance name. MasterInstanceName = "autok3s.%s.master" // WorkerInstanceName worker instance name.