package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Packages
go:generate mockery.
Package clustertrustbundle abstracts access to ClusterTrustBundles so that projected volumes can use them.
Package cm (abbreviation of "container manager") and its subpackages contain all the kubelet code to manage containers.
Package config implements the pod configuration readers.
go:generate mockery.
Package envvars is the package that build the environment variables that kubernetes provides to the containers run by it.
go:generate mockery.
Package images is responsible for managing lifecycle of container images.
Package kuberuntime contains an implementation of kubecontainer.Runtime using the interface in pkg/kubelet/v1.
Package lifecycle contains handlers for pod lifecycle events and interfaces to integrate with kubelet admission, synchronization, and eviction of pods.
Package nodeshutdown can watch for node level shutdown events and trigger graceful termination of pods running on the node prior to a system shutdown.
Package pleg contains types and a generic implementation of the pod lifecycle event generator.
go:generate mockery.
Package qos contains helper functions for quality of service.
Package server contains functions related to serving Kubelet's external interface.
go:generate mockery.
Package token implements a manager of serviceaccount tokens for pods running on the node.
Package types contains common types in the Kubelet.
Package util holds utility functions.
Package winstats provides a client to get node and pod level stats on windows.
# Functions
NewInitializedVolumePluginMgr returns a new instance of volume.VolumePluginMgr initialized with kubelets implementation of the volume.VolumeHost interface.
NewMainKubelet instantiates a new Kubelet object along with all the required internal modules.
NewReasonCache creates an instance of 'ReasonCache'.
PreInitRuntimeService will init runtime service before RunKubelet.
# Constants
Container state reason list.
ContainerGCPeriod is the period for performing container garbage collection.
DefaultContainerLogsDir is the location of container logs.
ImageGCPeriod is the period for performing image garbage collection.
KubeFirewallChain is kubernetes firewall rules.
KubeIPTablesHintChain is the chain whose existence in either iptables-legacy or iptables-nft indicates which version of iptables the system is using.
MaxContainerBackOff is the max backoff period for container restarts, exported for the e2e test.
MaxImageBackOff is the max backoff period for image pulls, exported for the e2e test.
NetworkNotReadyErrorMsg is used to describe the error that network is not ready.
Container state reason list.
SyncPod is when the pod is expected to be started and running.
TerminatedPod indicates the pod is stopped, can have no more running containers, and any foreground cleanup can be executed.
TerminatingPod is when the pod is no longer being set up, but some containers may be running and are being torn down.
# Variables
ContainerLogsDir can be overwritten for testing usage.
ErrNetworkUnknown indicates the network state is unknown.
# Structs
Dependencies is a bin for things we might consider "injected dependencies" -- objects constructed at runtime that are necessary for running the Kubelet.
KillPodOptions are options when performing a pod update whose update type is kill.
Kubelet is the main kubelet implementation.
PodWorkerSync is the summarization of a single pod worker for sync.
ReasonCache stores the failure reason of the latest container start in a string, keyed by <pod_UID>_<container_name>.
ReasonItem is the cached item in ReasonCache.
UpdatePodOptions is an options struct to pass to a UpdatePod operation.
# Interfaces
Bootstrap is a bootstrapping interface for kubelet, targets the initialization protocol.
PodWorkers is an abstract interface for testability.
SyncHandler is an interface implemented by Kubelet, for testability.
# Type aliases
OnCompleteFunc is a function that is invoked when an operation completes.
Option is a functional option type for Kubelet.
PodStatusFunc is a function that is invoked to override the pod status when a pod is killed.
PodWorkType classifies the status of pod as seen by the pod worker - setup (sync), teardown of containers (terminating), or cleanup (terminated).