mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 06:56:29 +00:00
fix rke cluster delete from cli
This commit is contained in:
committed by
Alena Prokharchyk
parent
116b47b025
commit
dc6f397f78
@@ -4,6 +4,7 @@ import (
|
||||
"bufio"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/rancher/rke/metadata"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@@ -56,6 +57,10 @@ func ClusterRemove(
|
||||
flags cluster.ExternalFlags) error {
|
||||
|
||||
log.Infof(ctx, "Tearing down Kubernetes cluster")
|
||||
|
||||
if metadata.K8sVersionToRKESystemImages == nil {
|
||||
metadata.InitMetadata(ctx)
|
||||
}
|
||||
kubeCluster, err := cluster.InitClusterObject(ctx, rkeConfig, flags)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user