MCPcopy
hub / github.com/derailed/k9s / Version

Method Version

internal/model/cluster.go:59–66  ·  view source on GitHub ↗

Version returns the current K8s cluster version.

()

Source from the content-addressed store, hash-verified

57
58// Version returns the current K8s cluster version.
59func (c *Cluster) Version() string {
60 info, err := c.factory.Client().ServerVersion()
61 if err != nil || info == nil {
62 return client.NA
63 }
64
65 return info.GitVersion
66}
67
68// ContextName returns the context name.
69func (c *Cluster) ContextName() string {

Callers 1

RefreshMethod · 0.45

Calls 2

ServerVersionMethod · 0.65
ClientMethod · 0.65

Tested by

no test coverage detected