kubekey/cmd/delete_node.go
pixiake 5e900b9210 Feature: Support for deploying k3s cluster
Signed-off-by: pixiake <guofeng@yunify.com>
2021-02-23 23:08:32 +08:00

23 lines
578 B
Go

package cmd
import (
"github.com/kubesphere/kubekey/pkg/cluster/delete"
"github.com/kubesphere/kubekey/pkg/util"
"github.com/spf13/cobra"
"strings"
)
var deleteNodeCmd = &cobra.Command{
Use: "node",
Short: "delete a node",
Run: func(cmd *cobra.Command, args []string) {
logger := util.InitLogger(opt.Verbose)
_ = delete.ResetNode(opt.ClusterCfgFile, logger, opt.Verbose, strings.Join(args, ""))
},
}
func init() {
deleteCmd.AddCommand(deleteNodeCmd)
deleteNodeCmd.Flags().StringVarP(&opt.ClusterCfgFile, "filename", "f", "", "Path to a configuration file")
}