diff --git a/pkg/cmd/cluster/connect.go b/pkg/cmd/cluster/connect.go index 537a240ff..cc312debd 100644 --- a/pkg/cmd/cluster/connect.go +++ b/pkg/cmd/cluster/connect.go @@ -539,11 +539,7 @@ func (o *ConnectOptions) checkUnsupportedEngine() error { engineType = o.componentDefV2.Labels[types.AddonNameLabelKey] } if o.targetClusterDef != nil && engineType == "" { - engineType = o.targetClusterDef.Labels[types.AddonNameLabelKey] - if engineType == "" { - // try old label - engineType = o.targetClusterDef.Labels[constant.AppNameLabelKey] - } + engineType = o.targetClusterDef.Name } if engineType == "" { return fmt.Errorf("fail to get the target engine type")