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)
- 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) KubeVersion() (version string, err error)
- func (n *Node) LoadImages()
- func (n *Node) SignalStart() error
- func (n *Node) String() string
- func (n *Node) WaitForDocker(until time.Time) bool
- func (n *Node) WriteKubeConfig(dest string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 `docker run`s the node image, note that due to images/node/entrypoint being the entrypoint, this container will effectively be paused until we call actuallyStartNode(...)
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) 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