Documentation ¶
Index ¶
- Constants
- Variables
- func CalcMaxPods(awsRegion string, instanceType string) int32
- func GetKubeClientFromKubeConfig() (kubernetes.Interface, error)
- func GetKubeletVersion() (string, error)
- func GetKubeletVersionRaw() (*string, error)
- func GetNodeName() (string, error)
- func Install(ctx context.Context, tracker *tracker.Tracker, src Source) error
- func KubeconfigPath() string
- func NewKubeletDaemon(daemonManager daemon.DaemonManager, cfg *api.NodeConfig, awsConfig *aws.Config) daemon.Daemon
- func Uninstall() error
- type Source
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 ¶
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 GetKubeletVersionRaw ¶
func GetNodeName ¶
GetNodeName gets the current node name from the providerId in kubelet config
func Install ¶
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
Types ¶
Click to show internal directories.
Click to hide internal directories.