k3d icon indicating copy to clipboard operation
k3d copied to clipboard

[BUG] k3d image import A/B:c.d --cluster cluster-a --cluster cluster-b fails on cluster-b

Open NikTJ777 opened this issue 4 years ago • 1 comments

What did you do

I tried using a single command to import the same image into 2 different clusters.

  • How was the cluster created?

    • k3d cluster create ntj-mc-cluster-a --network ntj-mc --k3s-server-arg '--kubelet-arg=eviction-hard=imagefs.available<60G,nodefs.available<60G' --k3s-server-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=5G,nodefs.available=5G

    • k3d cluster create ntj-mc-cluster-b --network ntj-mc --k3s-server-arg '--kubelet-arg=eviction-hard=imagefs.available<60G,nodefs.available<60G' --k3s-server-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=5G,nodefs.available=5G

  • What did you do afterwards?

    • k3d image import A/B:c.d --cluster ntj-mc-cluster-a --cluster ntj-mc-cluster-b

What did you expect to happen

The image would be successfully imported into both cluster-a and cluster-b

Screenshots or terminal output

$ k3d image import A/B:c.d --cluster ntj-mc-cluster-a --cluster ntj-mc-cluster-b INFO[0000] Importing image(s) into cluster 'ntj-mc-cluster-a' INFO[0000] Starting k3d-tools node...
INFO[0001] Starting Node 'k3d-ntj-mc-cluster-a-tools'
INFO[0002] Saving 1 image(s) from runtime...
INFO[0061] Importing images into nodes...
INFO[0061] Importing images from tarball '/k3d/images/k3d-ntj-mc-cluster-a-images-20210128225038.tar' into node 'k3d-ntj-mc-cluster-a-server-0'... INFO[0175] Removing the tarball(s) from image volume... INFO[0176] Removing k3d-tools node...
INFO[0203] Deleted k3d-ntj-mc-cluster-a-tools
INFO[0203] Successfully imported image(s)
INFO[0203] Importing image(s) into cluster 'ntj-mc-cluster-b' ERRO[0203] Failed to find the specified cluster
ERRO[0203] Failed to import image(s) into cluster 'ntj-mc-cluster-b': No nodes found for given cluster WARN[0203] At least one error occured while trying to import the image(s) into the selected cluster(s)

$ k3d cluster ls NAME SERVERS AGENTS LOADBALANCER ntj-mc-cluster-a 1/1 0/0 true ntj-mc-cluster-b 1/1 0/0 true

$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES cc8a3a013948 rancher/k3d-proxy:v4.0.0 "/bin/sh -c nginx-pr…" 7 hours ago Up 7 hours 80/tcp, 0.0.0.0:39446->6443/tcp k3d-ntj-mc-cluster-b-serverlb 578b52234ed9 rancher/k3s:v1.20.0-k3s2 "/bin/k3s server --k…" 7 hours ago Up 7 hours k3d-ntj-mc-cluster-b-server-0 ad736367b3d4 rancher/k3d-proxy:v4.0.0 "/bin/sh -c nginx-pr…" 7 hours ago Up 7 hours 80/tcp, 0.0.0.0:35030->6443/tcp k3d-ntj-mc-cluster-a-serverlb 07cc63ce5f80 rancher/k3s:v1.20.0-k3s2 "/bin/k3s server --k…" 7 hours ago Up 7 hours k3d-ntj-mc-cluster-a-server-0

Which OS & Architecture

  • Linux amd64 x86

Which version of k3d

  • output of k3d version $ k3d version k3d version v4.0.0 k3s version v1.20.0-k3s2 (default)

Which version of docker

  • output of docker version and docker info $ docker version Client: Docker Engine - Community Version: 19.03.8 API version: 1.40 Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:27:04 2020 OS/Arch: linux/amd64 Experimental: false

Server: Docker Engine - Community Engine: Version: 19.03.8 API version: 1.40 (minimum version 1.12) Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:25:42 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683

NikTJ777 avatar Jan 29 '21 04:01 NikTJ777

Hi @NikTJ777 , thanks for opening this issue! Can you please run the commands again with the --trace flag to enable verbose logging, so it's easier to debug for us?

iwilltry42 avatar Feb 03 '21 11:02 iwilltry42