1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 15:06:23 +00:00

print version

This commit is contained in:
Murali Paluru
2019-09-03 13:01:22 -07:00
committed by Alena Prokharchyk
parent 11c49ae59f
commit c69d971962
5 changed files with 14 additions and 1 deletions

View File

@@ -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)