kubelet

package
v1.2.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package kubelet provides minimal client for the kubelet API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotations added in v1.2.0

type Annotations struct {
	// ConfigMapSource indicates where the resource is coming from.
	// Its value is "file" for static pods and "api" for resources came from kube-apiserver.
	ConfigSource string `json:"kubernetes.io/config.source"`
}

Annotations are the annotations on a pod.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a kubelet API client.

Client can only talk to the local kubelet on the same node.

func NewClient

func NewClient(nodename string, clientCert, clientKey, caPEM []byte) (*Client, error)

NewClient creates new kubelet API client.

func (*Client) Pods

func (c *Client) Pods(ctx context.Context) (*PodList, error)

Pods returns list of pods running on the kubelet.

type Metadata added in v1.2.0

type Metadata struct {
	Name        string      `json:"name"`
	Namespace   string      `json:"namespace"`
	Annotations Annotations `json:"annotations"`
}

Metadata is a pod metadata.

type Pod added in v1.2.0

type Pod struct {
	Metadata Metadata     `json:"metadata"`
	Status   v1.PodStatus `json:"status"`
}

Pod returns pod details.

type PodList added in v1.2.0

type PodList struct {
	Items []Pod `json:"items"`
}

PodList is a list of pods.

Jump to

Keyboard shortcuts

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