Hey everyone. I'm currently using the k3s daggerverse module to stand up a Kubernetes cluster to do some e2e testing.
However, part of my tests requires that I use CAPD (Docker implementation of CAPI). Which requires the docker socket for creating "Machines" that are backed by Docker.
As a result, I'm passing the Socket to my k3s container, but now I'm having a bit of a networking sanfu. Essentially, the CAPI controller cannot connect to the cluster it's creating because the cluster is on my host network. Using KinD, I can see the cluster created. I.e. kind get clusters and I see my "test-cluster" listed while running my test.
Ultimately my question is how should I handle this networking issue to fix this error message from CAPI:
E0811 20:10:44.313611 1 cluster_accessor.go:262] "Connect failed" err="error creating HTTP client and mapper: cluster is not reachable: Get "https://x.x.x.x:6443/?timeout=5s\": context deadline exceeded" controller="clustercache" controllerGroup="cluster.x-k8s.io" controllerKind="Cluster" Cluster="default/test-cluster" namespace="default" name="test-cluster" reconcileID="d3e99ed5-a9fe-4e36-8295-c4e40e0a0b11"?
My normal setup would be to do all this with KinD on my localhost, but I'm trying to move this setup to Dagger.