Support Docker Desktop port forwarding for talosctl kubeconfig
#9571
PhilipSchmid
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there 👋,
When setting up a Talos-in-Docker cluster using
talosctl
like this:talos-local-cluster-patch.yaml
:talosctl cluster create \ --controlplanes 1 \ --workers 0 \ --kubernetes-version 1.31.0 \ --image ghcr.io/siderolabs/talos:v1.8.0 \ --install-image ghcr.io/siderolabs/installer:v1.8.0 \ --config-patch-control-plane @talos-local-cluster-patch.yaml \ --config-patch-control-plane '[{"op": "remove", "path": "/cluster/apiServer/admissionControl"}]' \ --docker-disable-ipv6 \ --skip-k8s-node-readiness-check
It automatically patches the kubeconfig (by default
~/.kube/config
), pointing to the Docker Desktop port forwarded KAPI (e.g.,https://127.0.0.1:59886
). However, when trying to manually get the kubeconfig using something liketalosctl kubeconfig ./talos-kubeconfig -n 10.5.0.2 -f
, the server points to, for example,https://10.5.0.2:6443
. This doesn't work, as10.5.0.2:6443
is not reachable from, for example, macOS.Potential workaround I've been using for far:
However, it would be highly appreciated if there was a specific
talosctl kubeconfig
flag that would either automatically write the proper Docker port forward information into the kubeconfig or provide a manual flag to override it (not only the IP but also the port). I'd assume the first option wouldn't even be too complicated, astalosctl
already has this knowledge from the setup:Beta Was this translation helpful? Give feedback.
All reactions