k8s

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKubeConfigFromHost

func GetKubeConfigFromHost(kubeconfigPath string) (*rest.Config, error)

You should pass an empty string for kubeconfigPath if you expect to load the kubeconfig stored at the default path: ~/.kube/config. If, however, you want to load a kubeconfig from a different path, pass the path to the kubeconfig file as the kubeconfigPath parameter.

Types

type Client

type Client struct {
	kubernetes.Interface
	Metrics metrics.Interface
}

func NewClient

func NewClient(config *rest.Config) (*Client, error)

func (*Client) CalculateResourceUtilization

func (c *Client) CalculateResourceUtilization(pod v1.Pod) (podUtilization, error)

func (*Client) PodMetrics

func (c *Client) PodMetrics(pod v1.Pod) (*v1beta1.PodMetrics, error)

func (*Client) PodResources

func (c *Client) PodResources(pod v1.Pod) *resources

func (*Client) Pods

func (c *Client) Pods(namspace string) (*v1.PodList, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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