kubernetes

package
v0.0.0-...-b44688a Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

README

Kubernetes Cluster Launcher

This launcher starts the Kubernetes cluster. It returns a cluster represented as a Task Handle instance. You can specify two executors:

  • One executor specify how to execute master services (and on what host as well) like apiserver, controller-manager and scheduler.
  • Second are for minion services like kubelet and proxy

Prerequisites

Assumption is that you follow the installation instructions to properly configure this package.

Note:

It is recommended to use 2 machines. It is important for the accuracy of the Swan experiment to have Kubernetes minion running separated from the master services to avoid interference.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//KubernetesMasterFlag indicates where Kubernetes control plane will be launched.
	KubernetesMasterFlag = conf.NewStringFlag("kubernetes_cluster_run_control_plane_on_host", "Address of a host where Kubernetes control plane will be run (when using -kubernetes and not connecting to existing cluster).", "127.0.0.1")
)

Functions

func New

func New(master executor.Executor, minion executor.Executor, config Config) executor.Launcher

New returns a new Kubernetes launcher instance consists of one master and one minion. In case of the same executor they will be on the same host (high risk of interferences). NOTE: Currently we support only single-kubelet (single-minion) kubernetes.

Types

type Config

type Config struct {
	// Comma separated list of nodes in the etcd cluster
	EtcdServers        string
	EtcdPrefix         string
	EtcdDataFormat     string
	LogLevel           int // 0 is info, 4 - debug (https://github.com/kubernetes/kubernetes/blob/master/docs/devel/logging.md).
	KubeAPIAddr        string
	KubeAPIPort        int
	KubeControllerPort int
	KubeSchedulerPort  int
	KubeProxyPort      int
	KubeletPort        int
	AllowPrivileged    bool
	// Address range to use for services.
	ServiceAddresses string

	// Optional configuration option for cleaning
	KubeletHost string

	// Custom args to apiserver and kubelet.
	KubeAPIArgs         string
	KubeControllerArgs  string
	KubeSchedulerArgs   string
	KubeletArgs         string
	KubeletCgroupDriver string
	KubeProxyArgs       string

	// Launcher configuration
	RetryCount uint64
}

Config contains all data for running kubernetes master & kubelet.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig is a constructor for Config with default parameters.

func (*Config) GetKubeAPIAddress

func (c *Config) GetKubeAPIAddress() string

GetKubeAPIAddress returns kube api server in HTTP format.

Jump to

Keyboard shortcuts

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