Documentation ¶
Overview ¶
Package nodes contains functionality for Kubernetes-in-Docker nodes It mostly exists to break up functionality from sigs.k8s.io/kind/pkg/cluster
Index ¶
- func Delete(nodes ...Node) error
- func ListByCluster(filters ...string) (map[string][]Node, error)
- func WaitForReady(node *Node, until time.Time) bool
- type Node
- func (n *Node) Cmder() exec.Cmder
- func (n *Node) Command(command string, args ...string) exec.Cmd
- func (n *Node) CopyTo(source, dest string) error
- func (n *Node) FixMounts() error
- func (n *Node) IP() (ip string, err error)
- func (n *Node) KubeVersion() (version string, err error)
- func (n *Node) LoadImages()
- func (n *Node) Ports(containerPort int) (hostPort int, err error)
- func (n *Node) SignalStart() error
- func (n *Node) String() string
- func (n *Node) WaitForDocker(until time.Time) bool
- func (n *Node) WriteKubeConfig(dest string, hostPort int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListByCluster ¶
ListByCluster returns a list of nodes by the kind cluster name
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a handle to a kind node This struct must be created by one of: CreateControlPlane It should not be manually instantiated Node impleemnts exec.Cmder
func CreateControlPlaneNode ¶
CreateControlPlaneNode creates a contol-plane node and gets ready for exposing the the API server
func CreateWorkerNode ¶ added in v0.1.0
CreateWorkerNode creates a worker node
func List ¶
List returns the list of container IDs for the kind "nodes", optionally filtered by docker ps filters https://docs.docker.com/engine/reference/commandline/ps/#filtering
func (*Node) FixMounts ¶
FixMounts will correct mounts in the node container to meet the right sharing and permissions for systemd and Docker / Kubernetes
func (*Node) KubeVersion ¶
KubeVersion returns the Kubernetes version installed on the node
func (*Node) LoadImages ¶
func (n *Node) LoadImages()
LoadImages loads image tarballs stored on the node into docker on the node
func (*Node) Ports ¶ added in v0.1.0
Ports returns a specific port mapping for the node Node by convention use well known ports internally, while random port are used for making the `kind` cluster accessible from the host machine
func (*Node) SignalStart ¶
SignalStart sends SIGUSR1 to the node, which signals our entrypoint to boot see images/node/entrypoint
func (*Node) WaitForDocker ¶
WaitForDocker waits for Docker to be ready on the node it returns true on success, and false on a timeout
func (*Node) WriteKubeConfig ¶
WriteKubeConfig writes a fixed KUBECONFIG to dest this should only be called on a control plane node While copyng to the host machine the control plane address is replaced with local host and the control plane port with a randomly generated port reserved during node creation.