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
Waiting 5m for Kubernetes cluster "k3d-k3s-default" to start...
timed out waiting for cluster to start: Get "https://host.docker.internal:49730/version": context deadline exceeded
When trying to start a k3d cluster on mac, ctlptl fails to detect cluster is online because it's using the docker internal name for the host machine (host.docker.internal), not the machine hostname outside of docker (localhost).
...
INFO[0016] Cluster 'k3s-default' created successfully!
INFO[0016] You can now use it like this:
kubectl cluster-info
Switched to context "k3d-k3s-default".
Waiting 5m for Kubernetes cluster "k3d-k3s-default" to start...
timed out waiting for cluster to start: Get "https://host.docker.internal:49730/version": context deadline exceeded
However, the k8s controller is available at https://localhost:49730/version
Temporary FIx
add host.docker.internal to /etc/hosts
sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts
apply command now works fully
...
INFO[0016] Cluster 'k3s-default' created successfully!
INFO[0016] You can now use it like this:
kubectl cluster-info
Switched to context "k3d-k3s-default".
cluster.ctlptl.dev/k3d-k3s-default created
The text was updated successfully, but these errors were encountered:
I think you're right. For some reason k3d is picking host.docker.internal as a resolvable hostname for the cluster.
To get the cluster to create successfully I have to do k3d cluster create --api-port localhost:6443, or add host.docker.internal to my /etc/hosts.
My issue seems subtly different. I think their issue is that their machine is resolving host.docker.internal from the os level even with ping, but for me i get ping: cannot resolve host.docker.internal: Unknown host, which should be correct.
Is there a way to pass this --api-port option to ctlptl?
I see #224, so maybe not currently.
I guess for now, my solution is to keep the /etc/hosts fix.
sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts
When trying to start a k3d cluster on mac,
ctlptl
fails to detect cluster is online because it's using the docker internal name for the host machine (host.docker.internal
), not the machine hostname outside of docker (localhost
).Steps to Reproduce
Install k3d and ctlptl
ctlptl-k3d.yml
apply cluster config
after 5 minute timeout we get an error
However, the k8s controller is available at
https://localhost:49730/version
Temporary FIx
add
host.docker.internal
to/etc/hosts
apply command now works fully
The text was updated successfully, but these errors were encountered: