kubelet

package
v1.4.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MPL-2.0 Imports: 11 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

type Annotations struct {
	// ConfigMapSource indicates where the resource is coming from.
	// Its value is "file"/"http" 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

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

Metadata is a pod metadata.

type Pod

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

Pod returns pod details.

type PodList

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