mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 15:06:23 +00:00
print version
This commit is contained in:
committed by
Alena Prokharchyk
parent
11c49ae59f
commit
c69d971962
@@ -3,6 +3,8 @@ package cmd
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/rancher/rke/cluster"
|
||||
"github.com/rancher/rke/pki"
|
||||
"github.com/urfave/cli"
|
||||
@@ -26,6 +28,7 @@ func VersionCommand() cli.Command {
|
||||
}
|
||||
|
||||
func getClusterVersion(ctx *cli.Context) error {
|
||||
logrus.Infof("Running RKE version: %v", ctx.App.Version)
|
||||
localKubeConfig := pki.GetLocalKubeConfig(ctx.String("config"), "")
|
||||
// not going to use a k8s dialer here.. this is a CLI command
|
||||
serverVersion, err := cluster.GetK8sVersion(localKubeConfig, nil)
|
||||
|
Reference in New Issue
Block a user