k3d: [BUG] Error: Failed waiting for log message 'Wrote kubeconfig' from node 'k3d-testing-server-1'
What did you do?
-
How was the cluster created?
k3d cluster create testing --servers 2 --agents 3
-
What did you do afterwards?
- wait & observe
What did you expect to happen?
Some info messages similar to the demo video on k3d.io and success.
Screenshots or terminal output Recording on Asciinema
tobtobxx@MacBook-Air ~ % k3d cluster create testing --servers 2 --agents 3
INFO[0000] Created network 'k3d-testing'
INFO[0000] Created volume 'k3d-testing-images'
INFO[0000] Creating initializing server node
INFO[0000] Creating node 'k3d-testing-server-0'
INFO[0012] Creating node 'k3d-testing-server-1'
INFO[0012] Creating node 'k3d-testing-agent-0'
INFO[0015] Creating node 'k3d-testing-agent-1'
INFO[0017] Creating node 'k3d-testing-agent-2'
INFO[0020] Creating LoadBalancer 'k3d-testing-serverlb'
ERRO[0021] Failed waiting for log message 'Wrote kubeconfig' from node 'k3d-testing-server-1'
ERRO[0021] Failed to start container
ERRO[0021] Failed to create node 'k3d-testing-serverlb'
ERRO[0021] Failed to create loadbalancer
ERRO[0021] error during connect: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/01fb21fd8a32b0ae561ea51dfedd44f3a3bb477307ff36fdb62d240fceb32b13/start": context canceled
ERRO[0021] Failed to create cluster >>> Rolling Back
INFO[0021] Deleting cluster 'testing'
INFO[0022] Deleted k3d-testing-server-0
INFO[0022] Deleted k3d-testing-server-1
INFO[0022] Deleted k3d-testing-agent-0
INFO[0023] Deleted k3d-testing-agent-1
INFO[0023] Deleted k3d-testing-agent-2
INFO[0023] Deleted k3d-testing-serverlb
INFO[0023] Deleting cluster network '84ac3cec99c71cfe2ac12f097bf9f6194bfd20594fa2539b07f0aec6fcede58e'
FATA[0023] Cluster creation FAILED, all changes have been rolled back!
Which OS & Architecture? MacOS Catalina (10.15.5)
Which version of k3d?
tobtobxx@MacBook-Air ~ % k3d version
k3d version v3.0.0
k3s version latest (default)
(installed via homebrew)
Which version of docker?
tobtobxx@MacBook-Air ~ % k3d version
k3d version v3.0.0
k3s version latest (default)
tobtobxx@MacBook-Air ~ % docker version
Client: Docker Engine - Community
Azure integration 0.1.7
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:41:33 2020
OS/Arch: darwin/amd64
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 19.03.12
API version: 1.40 (minimum version 1.12)
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:49:27 2020
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: v1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 38 (28 by maintainers)
This is a testable statement. So I went ahead and tested it. I have some spare credits on vultr, thus I used this provider.
I made the following install script:
Then I made the following VPSes and specified above as a start script:
This assertion might be correct, and if I can make another thesis on top: One CPU isnât enough.
Test run on @rogeliodh server:
I figured, that it will also fail sometimes, if you only create a single-server cluster (with the
--cluster-initflag). However, I found thativps231673:~$ k3d cluster create test --verbose --image rancher/k3s:v1.17.6-k3s1 --no-rollback --k3s-server-arg '--cluster-init'worked, whilek3d cluster create test --verbose --image rancher/k3s:v1.17.6-k3s1 --no-rollback --servers 3fails.I could imagine, that the environment comes into play here, as the CPU maxes out even when starting only a single server. SO I could imagine, that the leader election fails due to resource limitations, making the whole cluster crash đ€
@sdghchj If you could test the above scripts but donât install Docker via snap, but rather their PPA or something other native. Run the tests again and report if (what) you have different. That would be helpful!
@Filius-Patris I seriously have no clue, why youâre experiencing this. I just tried your setup step by step and I donât experience this problem on the first try (without rebooting the droplet). Hereâs my full output: https://pastebin.com/BvA8xmXc
EDIT: just installed kubectl afterwards to verify that the cluster is actually up:
Youâre right, that k3s shouldnât have an issue with limited resources, so I would assume that itâs the additional layer (docker) here that introduces those issues. Though I cannot verify this right nowâŠ
Das ist richtig đ k3d habe ich als mein eigenes Projekt gestartet (inspiriert durch ein Problem bei meiner Arbeit bei trivago). Das wurde dann auf GitHub durch Rancher ĂŒbernommen, damit es nĂ€her beim âSchwesterprojektâ k3s ist und mehr Reichweite erlangt. Das habe ich eine ganze Zeit lang privat gemacht, aber mittlerweile unterstĂŒtzt mich Rancher in dieser Rolle und zukĂŒnftig werde ich meine Arbeit als Freelancer fortsetzen. k3d ist und bleibt aber ein Community-Projekt đ Schöne GrĂŒĂe zurĂŒck rund um die Welt đ Du kannst mich gerne ĂŒber Twitter o.Ă€. anschreiben, wenn du mehr wissen möchtest, sodass wir nicht die Issues hier zuspammen đ
Another piece of information btw:
The docker daemon logs (or in my case, terminal output, I started it manually) show an error in the docker engine:
Canât tell if this is cause or symptom, but I figured documenting doesnât hurt.
Oh, btw, I just realized you can run the
cluster createcommand with--verbose. Here the relevant parts: