Version returns the current K8s cluster version.
()
| 57 | |
| 58 | // Version returns the current K8s cluster version. |
| 59 | func (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. |
| 69 | func (c *Cluster) ContextName() string { |
no test coverage detected