Open rc452860 opened 1 month ago
After adding the parameter -v /tmp/asdf:/var/log, Below is the output log.
# tail /tmp/asdf/k3d-entrypoints_240806085645.log
Bad argument `[unsupported'
Error occurred at line: 19
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
[2024-08-06T08:56:45+00:00] Running k3d entrypoints...
[2024-08-06T08:56:45+00:00] Running /bin/k3d-entrypoint-dns.sh
[2024-08-06T08:56:45+00:00] [DNS Fix] Use the detected Gateway IP 192.168.80.1 instead of Docker's embedded DNS (127.0.0.11)
[2024-08-06T08:56:45+00:00] [DNS Fix] > Changing iptables rules ...
Bad argument `[unsupported'
Error occurred at line: 19
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
(base) [root@VM-12-32-centos /data/k3d]# k3d runtime-info
this may be help
# iptables -h
iptables v1.4.21
Usage: iptables -[ACD] chain rule-specification [options]
iptables -I chain [rulenum] rule-specification [options]
iptables -R chain rulenum rule-specification [options]
iptables -D chain rulenum [options]
iptables -[LS] [chain [rulenum]] [options]
iptables -[FZ] [chain] [options]
iptables -[NX] chain
iptables -E old-chain-name new-chain-name
iptables -P chain target [options]
iptables -h (print this help information)
Commands:
Either long or short options are allowed.
--append -A chain Append to chain
--check -C chain Check for the existence of a rule
--delete -D chain Delete matching rule from chain
--delete -D chain rulenum
Delete rule rulenum (1 = first) from chain
--insert -I chain [rulenum]
Insert in chain as rulenum (default 1=first)
--replace -R chain rulenum
Replace rule rulenum (1 = first) in chain
--list -L [chain [rulenum]]
List the rules in a chain or all chains
--list-rules -S [chain [rulenum]]
Print the rules in a chain or all chains
--flush -F [chain] Delete all rules in chain or all chains
--zero -Z [chain [rulenum]]
Zero counters in chain or all chains
--new -N chain Create a new user-defined chain
--delete-chain
-X [chain] Delete a user-defined chain
--policy -P chain target
Change policy on chain to target
--rename-chain
-E old-chain new-chain
Change chain name, (moving any references)
Options:
--ipv4 -4 Nothing (line is ignored by ip6tables-restore)
--ipv6 -6 Error (line is ignored by iptables-restore)
[!] --protocol -p proto protocol: by number or name, eg. `tcp'
[!] --source -s address[/mask][...]
source specification
[!] --destination -d address[/mask][...]
destination specification
[!] --in-interface -i input name[+]
network interface name ([+] for wildcard)
--jump -j target
target for rule (may load target extension)
--goto -g chain
jump to chain with no return
--match -m match
extended match (may load extension)
--numeric -n numeric output of addresses and ports
[!] --out-interface -o output name[+]
network interface name ([+] for wildcard)
--table -t table table to manipulate (default: `filter')
--verbose -v verbose mode
--wait -w [seconds] maximum wait to acquire xtables lock before give up
--wait-interval -W [usecs] wait time to try to acquire xtables lock
default is 1 second
--line-numbers print line numbers when listing
--exact -x expand numbers (display exact values)
[!] --fragment -f match second or further fragments only
--modprobe=<command> try to insert modules using this command
--set-counters PKTS BYTES set the counter during insert/append
[!] --version -V print package version.
# sed --version
sed (GNU sed) 4.2.2
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Jay Fenlason, Tom Lord, Ken Pizzini,
and Paolo Bonzini.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-sed@gnu.org>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
# sed
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
-n, --quiet, --silent
suppress automatic printing of pattern space
-e script, --expression=script
add the script to the commands to be executed
-f script-file, --file=script-file
add the contents of script-file to the commands to be executed
--follow-symlinks
follow symlinks when processing in place
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
-c, --copy
use copy instead of rename when shuffling files in -i mode
-b, --binary
does nothing; for compatibility with WIN32/CYGWIN/MSDOS/EMX (
open files in binary mode (CR+LFs are not treated specially))
-l N, --line-length=N
specify the desired line-wrap length for the `l' command
--posix
disable all GNU extensions.
-r, --regexp-extended
use extended regular expressions in the script.
-s, --separate
consider files as separate rather than as a single continuous
long stream.
-u, --unbuffered
load minimal amounts of data from the input files and flush
the output buffers more often
-z, --null-data
separate lines by NUL characters
--help
display this help and exit
--version
output version information and exit
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
I was able to get things working without error using the following command:
➜ k3d version
k3d version v5.7.3
k3s version v1.30.3-k3s1 (default)
➜ k3d cluster create mycluster2 --api-port 6550 --servers 3 --agents 3 --image rancher/k3s:v1.30.3-k3s1 --wait
➜ k get node
NAME STATUS ROLES AGE VERSION
k3d-mycluster2-agent-0 Ready <none> 39s v1.30.3+k3s1
k3d-mycluster2-agent-1 Ready <none> 40s v1.30.3+k3s1
k3d-mycluster2-agent-2 Ready <none> 40s v1.30.3+k3s1
k3d-mycluster2-server-0 Ready control-plane,etcd,master 75s v1.30.3+k3s1
k3d-mycluster2-server-1 Ready control-plane,etcd,master 58s v1.30.3+k3s1
k3d-mycluster2-server-2 Ready control-plane,etcd,master 43s v1.30.3+k3s1
Had the same problem with a different use-case:
k3d cluster create test --kubeconfig-update-default=0 --image rancher/k3s:v1.27.15-k3s1 --wait --timeout=240s --no-lb --network test
This works with k3d 5.6.0 and 1.27.1<=k3s<=1.27.15 but fails with the image is k3s:v1.27.16-k3s1 with the same error:
INFO[0000] Prep: Network
INFO[0000] Created network 'test'
...
INFO[0001] Starting Node 'k3d-test-server-0'
ERRO[0003] Failed Cluster Start: Failed to start server k3d-test-server-0: Node k3d-test-server-0 failed to get ready: error waiting for log line `k3s is up and running` from node 'k3d-test-server-0': stopped returning log lines: node k3d-test-server-0 is running=true in status=running
ERRO[0003] Failed to create cluster >>> Rolling Back
...
FATA[0004] Cluster creation FAILED, all changes have been rolled back!
With v5.6.0 k3d version
outputs ... k3s version v1.27.4-k3s1 (default)
so I tried to run with newer version. The same problem happens with all released k3d versions upto and including 5.7.2. Although k3d version
for v5.7.2 outputs
k3d version v5.7.2
k3s version v1.29.6-k3s2 (default)
It fails to start a cluster with k3s v1.27.16+k3s1 although versions more 'recent' in semver terms work fine.
This problem is fixed in v5.7.3
The reason appears to be this change that adapts to the change in xargs version shipped in k3s. This can be misleading for users since unsupported versions can only be identified by release date. This issue is probably caused by k3s but I think this project needs to be document, for each minor version the highest patch version supported since not all are.
Had the same problem with a different use-case:
k3d cluster create test --kubeconfig-update-default=0 --image rancher/k3s:v1.27.15-k3s1 --wait --timeout=240s --no-lb --network test
This works with k3d 5.6.0 and 1.27.1<=k3s<=1.27.15 but fails with the image is k3s:v1.27.16-k3s1 with the same error:
INFO[0000] Prep: Network INFO[0000] Created network 'test' ... INFO[0001] Starting Node 'k3d-test-server-0' ERRO[0003] Failed Cluster Start: Failed to start server k3d-test-server-0: Node k3d-test-server-0 failed to get ready: error waiting for log line `k3s is up and running` from node 'k3d-test-server-0': stopped returning log lines: node k3d-test-server-0 is running=true in status=running ERRO[0003] Failed to create cluster >>> Rolling Back ... FATA[0004] Cluster creation FAILED, all changes have been rolled back!
With v5.6.0
k3d version
outputs... k3s version v1.27.4-k3s1 (default)
so I tried to run with newer version. The same problem happens with all released k3d versions upto and including 5.7.2. Althoughk3d version
for v5.7.2 outputsk3d version v5.7.2 k3s version v1.29.6-k3s2 (default)
It fails to start a cluster with k3s v1.27.16+k3s1 although versions more 'recent' in semver terms work fine.
This problem is fixed in v5.7.3
The reason appears to be this change that adapts to the change in xargs version shipped in k3s. This can be misleading for users since unsupported versions can only be identified by release date. This issue is probably caused by k3s but I think this project needs to be document, for each minor version the highest patch version supported since not all are.
yes, i was found this issue. but not work for me. I think is not same problem.
Had the same problem with a different use-case:
k3d cluster create test --kubeconfig-update-default=0 --image rancher/k3s:v1.27.15-k3s1 --wait --timeout=240s --no-lb --network test
This works with k3d 5.6.0 and 1.27.1<=k3s<=1.27.15 but fails with the image is k3s:v1.27.16-k3s1 with the same error:
INFO[0000] Prep: Network INFO[0000] Created network 'test' ... INFO[0001] Starting Node 'k3d-test-server-0' ERRO[0003] Failed Cluster Start: Failed to start server k3d-test-server-0: Node k3d-test-server-0 failed to get ready: error waiting for log line `k3s is up and running` from node 'k3d-test-server-0': stopped returning log lines: node k3d-test-server-0 is running=true in status=running ERRO[0003] Failed to create cluster >>> Rolling Back ... FATA[0004] Cluster creation FAILED, all changes have been rolled back!
With v5.6.0
k3d version
outputs... k3s version v1.27.4-k3s1 (default)
so I tried to run with newer version. The same problem happens with all released k3d versions upto and including 5.7.2. Althoughk3d version
for v5.7.2 outputsk3d version v5.7.2 k3s version v1.29.6-k3s2 (default)
It fails to start a cluster with k3s v1.27.16+k3s1 although versions more 'recent' in semver terms work fine. This problem is fixed in v5.7.3 The reason appears to be this change that adapts to the change in xargs version shipped in k3s. This can be misleading for users since unsupported versions can only be identified by release date. This issue is probably caused by k3s but I think this project needs to be document, for each minor version the highest patch version supported since not all are.
yes, i was found this issue. but not work for me. I think is not same problem.
Getting the same error here, when trying to init a cluster with terraform https://registry.terraform.io/providers/moio/k3d/latest
k3d --version
k3d version v5.7.3
k3s version v1.30.3-k3s1 (default)
Did you solve it?
What did you do
How was the cluster created? using command:
k3d cluster create --agents 3 demo
What did you do afterwards? Just upgrade k3d version to 5.7.3, after I tried several versions, I found that version 5.6.0 works well, and version 5.6.3 does not work.
What did you expect to happen
start cluster error with: error waiting for log line
k3s is up and running
Screenshots or terminal output
If applicable, add screenshots or terminal output (code block) to help explain your problem.
Which OS & Architecture
Which version of
k3d
Which version of docker