@@ -242,18 +242,23 @@ func (c *command) start(ctx context.Context, flags *config.ControllerOptions, de
242242 K0sVars : c .K0sVars ,
243243 }
244244 case v1beta1 .EtcdStorageType :
245- storageBackend = & controller.Etcd {
246- CertManager : certificateManager ,
247- Config : nodeConfig .Spec .Storage .Etcd ,
248- JoinClient : joinClient ,
249- K0sVars : c .K0sVars ,
250- LogLevel : c .LogLevels .Etcd ,
245+ config := nodeConfig .Spec .Storage .Etcd
246+ if ! config .IsExternalClusterUsed () {
247+ storageBackend = & controller.Etcd {
248+ CertManager : certificateManager ,
249+ Config : config ,
250+ JoinClient : joinClient ,
251+ K0sVars : c .K0sVars ,
252+ LogLevel : c .LogLevels .Etcd ,
253+ }
251254 }
252255 default :
253256 return fmt .Errorf ("invalid storage type: %s" , nodeConfig .Spec .Storage .Type )
254257 }
255- logrus .Infof ("using storage backend %s" , nodeConfig .Spec .Storage .Type )
256- nodeComponents .Add (ctx , storageBackend )
258+ if storageBackend != nil {
259+ logrus .Infof ("using storage backend %s" , nodeConfig .Spec .Storage .Type )
260+ nodeComponents .Add (ctx , storageBackend )
261+ }
257262
258263 controllerMode := flags .Mode ()
259264 // Will the cluster support multiple controllers, or just a single one?
@@ -306,7 +311,6 @@ func (c *command) start(ctx context.Context, flags *config.ControllerOptions, de
306311 ClusterConfig : nodeConfig ,
307312 K0sVars : c .K0sVars ,
308313 LogLevel : c .LogLevels .KubeAPIServer ,
309- Storage : storageBackend ,
310314 EnableKonnectivity : enableKonnectivity ,
311315 StopTimeout : flags .APIServerStopTimeout ,
312316
0 commit comments