Documentation ¶
Overview ¶
Package cluster implements kind kubernetes-in-docker cluster management
Index ¶
- Constants
- type Context
- func (c *Context) ClusterName() string
- func (c *Context) CollectLogs(dir string) error
- func (c *Context) Create(cfg *config.Config, retain bool, wait time.Duration) error
- func (c *Context) Delete() error
- func (c *Context) GetControlPlaneMeta() (*ControlPlaneMeta, error)
- func (c *Context) ListNodes() ([]nodes.Node, error)
- func (c *Context) Validate() error
- type ControlPlaneMeta
Constants ¶
const DefaultName = "1"
DefaultName is the default Context name TODO(bentheelder): consider removing automatic prefixing in favor of letting the user specify the full name..
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
*meta.ClusterMeta
}
Context is used to create / manipulate kubernetes-in-docker clusters See: NewContext()
func NewContext ¶
NewContext returns a new cluster management context if name is "" the default ("1") will be used
func (*Context) ClusterName ¶
ClusterName returns the Kubernetes cluster name based on the context name currently this is .Name prefixed with "kind-"
func (*Context) CollectLogs ¶
CollectLogs will populate dir with cluster logs and other debug files
func (*Context) GetControlPlaneMeta ¶ added in v0.1.0
func (c *Context) GetControlPlaneMeta() (*ControlPlaneMeta, error)
GetControlPlaneMeta attempts to retreive / compute metadata about the control plane for the context's cluster NOTE: due to refactoring this is currently non-functional (!) TODO(bentheelder): fix this
func (*Context) ListNodes ¶
ListNodes returns the list of container IDs for the "nodes" in the cluster
func (*Context) Validate ¶
Validate will be called before creating new resources using the context It will not be called before deleting or listing resources, so as to allow contexts based around previously valid values to be used in newer versions You can call this early yourself to check validation before creation calls, though it will be called internally.
type ControlPlaneMeta ¶ added in v0.1.0
type ControlPlaneMeta struct { // APIServerPort is the port that the container is forwarding to the // Kubernetes API server running in the container APIServerPort int }
ControlPlaneMeta tracks various outputs that are relevant to the control plane created with Kind. Here we can define things like ports and listen or bind addresses as needed.
Directories ¶
Path | Synopsis |
---|---|
Package config implements the current apiVersion of the `kind` Config along with some common abstractions +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta
|
Package config implements the current apiVersion of the `kind` Config along with some common abstractions +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta |
defaults
Package defaults contains cross-api-version configuration defaults
|
Package defaults contains cross-api-version configuration defaults |
encoding
Package encoding implements utilities for decoding from yaml the `kind` Config
|
Package encoding implements utilities for decoding from yaml the `kind` Config |
v1alpha1
Package v1alpha1 implements the v1alpha1 apiVersion of the `kind` Config +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta
|
Package v1alpha1 implements the v1alpha1 apiVersion of the `kind` Config +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta |
v1alpha2
Package v1alpha2 implements the v1alpha2 apiVersion of the `kind` Config that introduces multi node support +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta
|
Package v1alpha2 implements the v1alpha2 apiVersion of the `kind` Config that introduces multi node support +k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta |
Package constants contains well known constants for kind clusters
|
Package constants contains well known constants for kind clusters |
internal
|
|
kubeadm
Package kubeadm contains kubeadm related constants and configuration
|
Package kubeadm contains kubeadm related constants and configuration |
Package logs contains tooling for obtaining cluster logs
|
Package logs contains tooling for obtaining cluster logs |
Package nodes contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster
|
Package nodes contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster |