k3d: [BUG] k3d v4.0.0 cannot create a cluster w/o a load balancer
What did you do
-
How was the cluster created?
k3d create cluster --servers 3 --no-lb
-
What did you do afterwards?
- k3d commands?
- docker commands?
- OS operations (e.g. shutdown/reboot)?
What did you expect to happen
I expected to be able to create a 3 node cluster w/o a load balancer.
Screenshots or terminal output
λ k3d cluster create --servers 3 --no-lb true
INFO[0000] Prep: Network
INFO[0000] Created network 'k3d-true'
INFO[0000] Created volume 'k3d-true-images'
INFO[0000] Creating initializing server node
panic: assignment to entry in nil map
goroutine 1 [running]:
github.com/rancher/k3d/v4/pkg/client.ClusterCreate(0x4e51800, 0xc000122000, 0x4e66020, 0x54b1d68, 0xc000151620, 0xc0001516a0, 0x0, 0x0)
github.com/rancher/k3d/v4/pkg/client/cluster.go:431 +0x1a39
github.com/rancher/k3d/v4/pkg/client.ClusterRun(0x4e51800, 0xc000122000, 0x4e66020, 0x54b1d68, 0xc000151600, 0x0, 0x4e29120)
github.com/rancher/k3d/v4/pkg/client/cluster.go:64 +0x15b
github.com/rancher/k3d/v4/cmd/cluster.NewCmdClusterCreate.func1(0xc000166b00, 0xc00047f300, 0x1, 0x4)
github.com/rancher/k3d/v4/cmd/cluster/clusterCreate.go:128 +0x51c
github.com/spf13/cobra.(*Command).execute(0xc000166b00, 0xc00047f2c0, 0x4, 0x4, 0xc000166b00, 0xc00047f2c0)
github.com/spf13/cobra@v1.1.0/command.go:854 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x5472100, 0xc00013a010, 0x6, 0x6)
github.com/spf13/cobra@v1.1.0/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.1.0/command.go:895
github.com/rancher/k3d/v4/cmd.Execute()
github.com/rancher/k3d/v4/cmd/root.go:91 +0x5a
main.main()
github.com/rancher/k3d/v4/main.go:27 +0x25
Which OS & Architecture
- Linux, Windows, MacOS / amd64, x86, …? macOS
λ uname -a
Darwin weisjohn 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64 i386 MacBookPro15,1 Darwin
Which version of k3d
- output of
k3d version
$ k3d version
k3d version v4.0.0
k3s version latest (default)
Which version of docker
- output of
docker versionanddocker info
$ docker version
Client: Docker Engine - Community
Cloud integration: 1.0.7
Version: 20.10.2
API version: 1.41
Go version: go1.13.15
Git commit: 2291f61
Built: Mon Dec 28 16:12:42 2020
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.2
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8891c58
Built: Mon Dec 28 16:15:28 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.3
GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
$ docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
scan: Docker Scan (Docker Inc., v0.5.0)
Server:
Containers: 91
Running: 4
Paused: 0
Stopped: 87
Images: 50
Server Version: 20.10.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
Default Runtime: runc
Init Binary: docker-init
containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 4.19.121-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 11.7GiB
Name: docker-desktop
ID: WRHM:3LMI:2HMB:6JNE:W5VH:6TVC:5MNA:HSI6:Z642:SREJ:K4CU:CGIO
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 73
Goroutines: 70
System Time: 2021-01-25T21:09:39.059923534Z
EventsListeners: 3
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (10 by maintainers)
Commits related to this issue
- commit e1193261847274f293cb524fc2ceb5f864f5b66e Author: iwilltry42 <iwilltry42@gmail.com> Date: Wed Feb 3 12:36:04 2021 +0100 fix: --no-lb failed - initialize port map of initnode, if nil ... — committed to k3d-io/k3d by iwilltry42 3 years ago
- fix: init portmap if nil in all cases (#463) — committed to k3d-io/k3d by iwilltry42 3 years ago
- commit 0c7db203d03b38ccb6e6739fda7b6778f8c75a8c Author: iwilltry42 <iwilltry42@gmail.com> Date: Wed Feb 3 13:54:11 2021 +0100 fix: init portmap if nil in all cases (#463) — committed to k3d-io/k3d by iwilltry42 3 years ago
- commit 0c7db203d03b38ccb6e6739fda7b6778f8c75a8c Author: iwilltry42 <iwilltry42@gmail.com> Date: Wed Feb 3 13:54:11 2021 +0100 fix: init portmap if nil in all cases (#463) — committed to k3d-io/k3d by iwilltry42 3 years ago
@iwilltry42 sound’s promising. Will take care of it!
@eshepelyuk, good to hear 👍;; here is how we use that.
@kuritka nice! That GitHub action is pretty cool, I’ve got to look into it 🙂 I’d happily accept a PR to list it in our readme and the homepage as a related project 👍
Amazing job @iwilltry42! working as expected.
OMG 😃 i’ve been looking for smth like this to create integration tests for my k8s operator !
Worked for me, thanks.
@kuritka , the release failed due to issues with DockerHub. I think the install script should error out here 🤔 I will trigger a new release as soon as possible.