https://rancher.com/ logo
Title
p

polite-engineer-55788

09/28/2022, 4:13 AM
Is there away to reach the kubernetes cluster from within another docker container ?
I get this error when using
host.k3d.internal
"<https://host.k3d.internal:34139/version>": x509: certificate is valid for host.docker.internal, k3d-lingua-greeter-server-0, kubernetes, kubernetes.default, kubernetes.default.svc, kubernetes.default.svc.cluster.local, localhost, not host.k3d.internal
w

wide-garage-9465

09/28/2022, 6:00 AM
I wonder how host.k3d.internal works in a non-k3d container? I would've gone with host.docker.internal or the container name or container IP (if the client container is in the same network)
p

polite-engineer-55788

09/28/2022, 6:01 AM
host.docker.internal
did not work as well and finally I used the
kubernetes.default.svc.cluster.local
and that seemed to work
the pod is
docker:dind
w

wide-garage-9465

09/28/2022, 6:03 AM
So it's a pod, not another docker container like you wrote initially?
p

polite-engineer-55788

09/28/2022, 6:03 AM
yeah its a pod, sorry that was my typo 😄
sadly I was not able to edit it
w

wide-garage-9465

09/28/2022, 12:54 PM
Then kubernetes.default makes the most sense given that it's an in-cluster connection. Still, feel free to open an issue about adding a TLS SAN for host.k3d.internal 👍
👍🏽 1