func TryGetServerVersion(cdi discovery.CachedDiscoveryInterface) ServerVersion {
	defaultSV := ServerVersion{
		Major: 1,
		Minor: 14,
	}
	if sv, err := cdi.ServerVersion(); err == nil {
		if v, err := parseVersion(sv); err == nil {
			return v
		}
		return defaultSV
	}
	return defaultSV
}
TryGetServerVersion attempts to retrieve the server version from k8s.
Returns the configured default version in case this fails.
package cluster
import (
	"fmt"
	"regexp"
	"strconv"
	"strings"
	"k8s.io/apimachinery/pkg/version"
	"k8s.io/client-go/discovery"
)
type ServerVersion struct {
	Major, Minor int
}
func (v ServerVersion) String() string {
	return fmt.Sprintf("%d.%d", v.Major, v.Minor)
}
func (v ServerVersion) Compare(version ServerVersion) int {
	a := v.Major
	b := version.Major
	if a == b {
		a = v.Minor
		b = version.Minor
	}
	var res int
	if a > b {
		res = 1
	} else if a == b {
		res = 0
	} else {
		res = -1
	}
	return res
}