kubernetes

package
v1.2.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const LocalServer = "server: https://127.0.0.1"

Variables

This section is empty.

Functions

func AddLabelsForNodes

func AddLabelsForNodes(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

AddLabelsForNodes is used to add pre-configured labels.

func GetClusterStatus

func GetClusterStatus(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

GetClusterStatus is used to fetch status and info from cluster.

func GetKubeConfigForControlPlane added in v1.2.0

func GetKubeConfigForControlPlane(mgr *manager.Manager) error

getKubeConfigForControlPlane is used to copy admin.conf to ~/.kube/config .

func InitKubernetesCluster

func InitKubernetesCluster(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

InitKubernetesCluster is used to init a new cluster.

func InstallKubeBinaries

func InstallKubeBinaries(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

InstallKubeBinaries is used to install kubernetes' binaries to os' PATH.

func JoinNodesToCluster

func JoinNodesToCluster(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

JoinNodesToCluster is used to join node to Cluster.

func SetKubelet

func SetKubelet(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

SetKubelet is used to configure the kubelet's startup parameters.

func SyncKubeBinaries

func SyncKubeBinaries(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

SyncKubeBinaries is used to sync kubernetes' binaries to each node.

func UpdateHostsFile added in v1.2.0

func UpdateHostsFile(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

UpdateHostsFile is used to update the '/etc/hosts'. Make the 'lb.kubesphere.local' address to set as 127.0.0.1. All of the 'admin.conf' and '/.kube/config' will connect to 127.0.0.1:6443.

func UpdateKubectlConfig added in v1.2.0

func UpdateKubectlConfig(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

UpdateKubectlConfig is used to update the kubectl config. Make the value of field 'server' to set as 127.0.0.1:6443 (default). And all of the 'admin.conf' will connect to 127.0.0.1:6443 (default)

func UpdateKubeletConfig added in v1.2.0

func UpdateKubeletConfig(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

UpdateKubeletConfig Update server filed in kubelet.conf When create a HA cluster by internal LB, we will set the server filed to 127.0.0.1:6443 (default) which in kubelet.conf. Because of that, the control plone node's kubelet connect the local api-server. And the work node's kubelet connect 127.0.0.1:6443 (default) that is proxy by the node's local nginx.

func UpdateKubeproxyConfig added in v1.2.0

func UpdateKubeproxyConfig(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error

UpdateKubeproxyConfig is used to update kube-proxy configmap and restart tge kube-proxy pod.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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