kubelet

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BinPath is the path to the Kubelet binary.
	BinPath = "/usr/bin/kubelet"

	// UnitPath is the path to the Kubelet systemd unit file.
	UnitPath = "/etc/systemd/system/kubelet.service"
)
View Source
const KubeletDaemonName = "kubelet"

Variables

View Source
var MaxPodsPerInstanceType map[string]int

Functions

func CalcMaxPods

func CalcMaxPods(awsRegion string, instanceType string) int32

CalcMaxPods handle the edge case when instance type is not present in MaxPodsPerInstanceType The behavior should align with AL2, which essentially is:

# of ENI * (# of IPv4 per ENI - 1) + 2

func GetKubeClientFromKubeConfig

func GetKubeClientFromKubeConfig() (kubernetes.Interface, error)

GetKubeClientFromKubeConfig gets kubernetes client from kubeconfig on the disk

func GetKubeletVersion

func GetKubeletVersion() (string, error)

func GetKubeletVersionRaw

func GetKubeletVersionRaw() (*string, error)

func GetNodeName

func GetNodeName() (string, error)

GetNodeName gets the current node name from the providerId in kubelet config

func Install

func Install(ctx context.Context, tracker *tracker.Tracker, src Source) error

Install installs kubelet at BinPath and installs a systemd unit file at UnitPath. The systemd unit is configured to launch the kubelet binary.

func KubeconfigPath

func KubeconfigPath() string

KubeconfigPath returns the path to the kubeconfig file used by the kubelet.

func NewKubeletDaemon

func NewKubeletDaemon(daemonManager daemon.DaemonManager, cfg *api.NodeConfig, awsConfig *aws.Config) daemon.Daemon

func Uninstall

func Uninstall() error

Types

type Source

type Source interface {
	GetKubelet(context.Context) (artifact.Source, error)
}

Source represents a source that serves a kubelet binary.

Jump to

Keyboard shortcuts

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