Help us shape the future of Go! Take the 2026 Go Developer Survey

kind

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package kind is the Kubernetes runtime on a local kind cluster, plus what only kind can do: create and delete the cluster with a local registry, load images, and shell into nodes with docker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(env core.Env, c *spec.Component) (any, error)

Types

type Options

type Options struct {
	kubernetes.Options `yaml:",inline"`
	Cluster            string `yaml:"cluster"`
	NodeImage          string `yaml:"node_image"`
	Workers            int    `yaml:"workers"`
	// RegistryPort runs a registry container on localhost:<port> that the cluster pulls from.
	RegistryPort int `yaml:"registry_port"`
	// Preload copies these local docker images into the nodes on create, for clusters that cannot pull.
	Preload []string `yaml:"preload"`
}

type Runtime

type Runtime struct {
	*kubernetes.Runtime
	// contains filtered or unexported fields
}

func (*Runtime) Actions

func (r *Runtime) Actions() []core.Action

func (*Runtime) Hosts

func (r *Runtime) Hosts(ctx context.Context) ([]core.Host, error)

Hosts are the cluster's nodes. Kind nodes are local containers, so docker fills in what the API server cannot give: the whole list when kubectl cannot reach the cluster (stopped, or its context missing from the kubeconfig), and the load, plus CPU and memory when the kubelet summary is missing.

func (*Runtime) LoadImage

func (r *Runtime) LoadImage(ctx context.Context, image string) error

LoadImage copies a local docker image into the cluster's nodes.

func (*Runtime) Shell

func (r *Runtime) Shell(ctx context.Context, host string, command []string) (*exec.Cmd, error)

Jump to

Keyboard shortcuts

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