posh-providers/k3d-io/k3d
Kevin Franklin Kim 2c888893bf
fix: lint issues
2025-08-01 09:17:59 +02:00
..
checker.go fix: lint issues 2025-08-01 09:17:59 +02:00
cluster.go feat: add k3d 2023-06-06 12:31:07 +02:00
command.go feat: clear cache 2025-04-04 16:45:12 +02:00
config_test.go feat: add schema 2025-04-04 16:44:08 +02:00
config.go feat(k3d): switch to map 2024-01-25 17:50:28 +01:00
config.schema.json feat: add schema 2025-04-04 16:44:08 +02:00
k3d.go feat: lint errors 2023-06-06 12:33:28 +02:00
README.md docs: update READMEs 2025-02-21 11:44:54 +01:00
registry.go feat: add k3d 2023-06-06 12:31:07 +02:00

K3d

Usage

Plugin

package plugin

type Plugin struct {
	l        log.Logger
  k3d      *k3d.K3d
	commands command.Commands
}

func New(l log.Logger) (plugin.Plugin, error) {
	inst := &Plugin{
		l:        l,
		commands: command.Commands{},
	}

  var err error

  // ...

  inst.k3d, err = k3d.New(l)
  if err != nil {
    return nil, errors.Wrap(err, "failed to create k3d")
  }

	// ...

  inst.commands.MustAdd(k3d.NewCommand(l, inst.k3d, inst.kubectl))

	// ...

	return inst, nil
}

Config

## K3d
k3d:
  charts:
    path: path/to/k3d
    prefix: shared-
  registry:
    name: foomo-registry
    port: 12345
  clusters:
    local:
      port: 9443
      alias: foomo
      enableTraefikRouter: false
      image: rancher/k3s:v1.28.2-k3s1

Ownbrew

To install binary locally, add:

ownbrew:
  packages:
    ## https://github.com/k3d-io/k3d/releases
    - name: k3d
      tap: foomo/tap/k3d-io/k3d
      version: 5.6.0