adamant-kite-43734
08/01/2023, 5:35 PMwide-garage-9465
08/01/2023, 6:17 PMwide-garage-9465
08/01/2023, 6:19 PMlittle-dress-13576
08/01/2023, 8:32 PMdocker pull internal_repo/docker_io_proxy/rancher/k3s
, docker pull internal_repo/docker_io_proxy/rancher/k3s-proxy
, and docker pull internal_repo/docker_io_proxy/rancher/k3s-tools
, and I could see these 3 images showing up via docker images
. Then I copied the tar file to /var/lib/rancher/k3s/agent/images/
. Then I tried this command:
k3d cluster create k3d-local --network host --no-lb --k3s-arg "--disable=traefik,servicelb" --k3s-arg "--kube-apiserver-arg=feature-gates=MixedProtocolLBService=true" --host-pid-mode --image internal_repo/docker_io_proxy/rancher/k3s:v1.27.4-k3s1
Here are the messages with error:
INFO[0000] [SimpleConfig] Hostnetwork selected - disabling injection of docker host into the cluster, server load balancer and setting the api port to the k3s default
WARN[0000] No node filter specified
WARN[0000] No node filter specified
INFO[0000] [ClusterConfig] Hostnetwork selected - disabling injection of docker host into the cluster, server load balancer and setting the api port to the k3s default
INFO[0000] Prep: Network
INFO[0000] Re-using existing network 'host' (...)
INFO[0000] Created image volume k3d-k3d-local-images
INFO[0000] Starting new tools node...
INFO[0001] Creating node 'k3d-k3d-local-server-0'
INFO[0001] Using the k3d-tools node to gather environment information
ERRO[0015] Failed to run tools container for cluster 'k3d-local'
INFO[0015] Starting new tools node...
ERRO[0030] Failed to run tools container for cluster 'k3d-local'
ERRO[0030] failed to gather environment information used for cluster creation: failed to run k3d-tools node for cluster 'k3d-local': failed to create node 'k3d-k3d-local-tools': runtime failed to create node 'k3d-k3d-local-tools': failed to create container for node 'k3d-k3d-local-tools': docker failed to pull image '<http://ghcr.io/k3d-io/k3d-tools:5.5.1|ghcr.io/k3d-io/k3d-tools:5.5.1>': docker failed to pull the image '<http://ghcr.io/k3d-io/k3d-tools:5.5.1|ghcr.io/k3d-io/k3d-tools:5.5.1>': Error response from daemon: Get "<https://ghcr.io/v2/>": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
ERRO[0030] Failed to create cluster >>> Rolling Back
INFO[0030] Deleting cluster 'k3d-local'
INFO[0030] Deleting 1 attached volumes...
FATA[0030] Cluster creation FAILED, all changes have been rolled back!
little-dress-13576
08/01/2023, 8:34 PMdocker images
has these in its output:
internal_repo/docker_io_proxy/rancher/k3s v1.27.4-k3s1
internal_repo/docker_io_proxy/rancher/k3s-tools latest
internal_repo/docker_io_proxy/rancher/k3s-proxy latest
little-dress-13576
08/01/2023, 8:35 PMk3d
command to look for images locally?little-dress-13576
08/01/2023, 11:00 PM<http://ghcr.io/k3d-io/k3d-tools:5.5.1|ghcr.io/k3d-io/k3d-tools:5.5.1>
, and the k3d cluster create
command completed successfully. it seems it did not look for k3d-proxy. But kubectl cluster-info
failed, with
E0801 18:57:57.095694 43499 memcache.go:265] couldn't get current server API group list: Get "<https://127.0.0.1:6443/api?timeout=32s>": tls: failed to verify certificate: x509: certificate signed by unknown authority
what else is missing?little-dress-13576
08/01/2023, 11:27 PMkubectl --kubeconfig k3d-local.kubeconfig cluster-info
little-dress-13576
08/01/2023, 11:33 PMContainerCreating
statelittle-dress-13576
08/01/2023, 11:57 PMWarning FailedCreatePodSandBox 2m5s kubelet Failed to create pod sandbox: rpc error: code = DeadlineExceeded desc = failed to get sandbox image "rancher/mirrored-pause:3.6": failed to pull image "rancher/mirrored-pause:3.6": failed to pull and unpack image "<http://docker.io/rancher/mirrored-pause:3.6|docker.io/rancher/mirrored-pause:3.6>": failed to resolve reference "<http://docker.io/rancher/mirrored-pause:3.6|docker.io/rancher/mirrored-pause:3.6>": failed to do request: Head "<https://registry-1.docker.io/v2/rancher/mirrored-pause/manifests/3.6>": dial tcp 34.205.13.154:443: i/o timeout
little-dress-13576
08/02/2023, 4:16 AM1. k3d cluster create
2. k3d image import corresponding_tar.file
why can’t this be done with just one command? too complex..wide-garage-9465
08/02/2023, 6:46 AMK3D_IMAGE_TOOLS
and K3D_IMAGE_LOADBALANCER
so you don't have to retag locally.
And the K3s image you can specify via `--image`or via config file when creating the cluster.
And according to the K3s docs, you could put the images.tar into any directory and volume mount it to /var/lib/rancher/k3s/agent/images/
so you wouldn't need the import.
All of this can be put in a single line command actually.
In case you didn't check them beforey here's the K3s docs: https://docs.k3s.io/installation/airgap
Feel free to open a k3d issue to get full docs there as well 👍little-dress-13576
08/02/2023, 1:00 PM--image
parameter and passed in the k3d cluster create command as shown before:
--image internal_repo/docker_io_proxy/rancher/k3s:v1.27.4-k3s1
that did not help. I already went through the k3s airgap doc before, and that worked for me. I did the following steps already, but that did not help:
sudo mkdir -p /var/lib/rancher/k3s/agent/images/
sudo cp ./k3s-airgap-images-$ARCH.tar /var/lib/rancher/k3s/agent/images/
not sure about the volume mount one, I just did docker inspect k3d-k3s-default-server-0
, and I don’t see any volume mount for this docker container ..