client

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterVersion

func GetClusterVersion(c *kubernetes.Clientset) string

GetClusterVersion get kube cluster version.

func GetStatus

func GetStatus(node *v1.Node) (status string)

func IsMaster

func IsMaster(node *v1.Node) bool

IsMaster To check if a Node is a master node, search if the label “node-role.kubernetes.io/master” is present.

func IsReady

func IsReady(node *v1.Node) bool

IsReady To see if a Node is Ready

Types

type K8sClient

type K8sClient struct {
	Config    *rest.Config
	Clientset *kubernetes.Clientset
}

func NewClient

func NewClient(clusterName string) (client K8sClient, err error)

NewClient return new cobernetes clent for clusterName config

func (*K8sClient) Age

func (c *K8sClient) Age(node *v1.Node) uint

Age Calculate the age of a Node from the CreationTimestamp.

func (*K8sClient) GetClusterStatus

func (c *K8sClient) GetClusterStatus() string

GetClusterStatus cluster status

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL