You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've upgraded k3d to v4.4.1 using go get -u github.com/rancher/k3d/[email protected] but when I try to create a new cluster using k3d cluster create I get the following error:
WARN[0000] No node filter specified
FATA[0000] Portmapping '[]' lacks a node filter, but there's more than one node
How was the cluster created?
k3d cluster create
What did you do afterwards?
Tried using a config file but nothing changed
k3d node list but it's empty
What did you expect to happen
I expect a new cluster to be created and ready to be used.
Screenshots or terminal output
❯ k3d cluster create mycluster
WARN[0000] No node filter specified
FATA[0000] Portmapping '[]' lacks a node filter, but there's more than one node
Hi @FedericoAntoniazzi , thanks for opening this issue!
This looks like a problem with the Cobra/Viper modules used for CLI/Config 🤔
The []s should not be quoted in the config output. E.g.
k3s:
extraagentargs: '[]'extraserverargs: '[]'
should actually be
k3s:
extraagentargs: []extraserverargs: []
The way it happens to be in your case, the brackets will be treated as text/string instead of array/slice.
I cannot reproduce this on my Ubuntu and Windows machines 🤔
Does the problem still exist with k3d v4.4.2?
I've just tried compiling k3d on my pc and installing using curl/wget, both methods work. On the other hand, using go get -u github.com/rancher/k3d/[email protected] causes the issue discussed in this topic so I don't think it's a k3d problem.
Extra notes:
The README.md and k3d.io include the installation using go install github.com/rancher/k3d but it doesn't work. Here's why:
❯ go install github.com/rancher/k3d
go install: version is required when current directory is not in a module
Try 'go install github.com/rancher/k3d@latest' to install the latest version
so I append @v4.4.2
❯ go install github.com/rancher/[email protected]
go install github.com/rancher/[email protected]: github.com/rancher/[email protected]: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v4
Looking at the go.mod file, it has /v4 after the module's name and I try to add it to the install command
ust be compatible: should be v0 or v1, not v4
❯ go install github.com/rancher/k3d/[email protected]
go install github.com/rancher/k3d/[email protected]: github.com/rancher/k3d/[email protected]
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.
You're actually right there.
We're currently using a Viper Fork as we're waiting for a PR to be merged upstream.
Since go get doesn't honor replace directives (golang/go#30354), this fails when using the go get install method.
As mentioned, this is intended to be temporary, so I hope that go getting k3d for installation will work again soon.
What did you do
I've upgraded k3d to v4.4.1 using
go get -u github.com/rancher/k3d/[email protected]
but when I try to create a new cluster usingk3d cluster create
I get the following error:How was the cluster created?
k3d cluster create
What did you do afterwards?
What did you expect to happen
I expect a new cluster to be created and ready to be used.
Screenshots or terminal output
Which OS & Architecture
Which version of
k3d
Which version of docker
The text was updated successfully, but these errors were encountered: