Repository navigation
feat(cluster): host-usable kubeconfig for local tenants (PR 2.5) + auto-derive lb-pool - #60
Merged
Merged
Conversation
… lb-pool On macOS/Windows a local-provider tenant kubeconfig points at a docker-bridge LoadBalancer IP the host cannot route to, so `kubectl get nodes` hangs. For local tenants on those platforms, `cluster kubeconfig` now establishes a background port-forward to the tenant API server and rewrites the kubeconfig to 127.0.0.1 (keeping the original host as tls-server-name so the server cert still verifies), so the documented walkthrough works with no manual steps. On Linux the bridge IP is reachable directly, so the kubeconfig is emitted verbatim. `cluster create` now derives the LoadBalancer pool from the kind docker network for local clusters when --lb-pool is omitted, so the documented create command works without a machine-specific flag. The cluster-detail TUI gains an access hint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The local laptop path's headline step hung on macOS.
butlerctl cluster kubeconfig <tenant>returned a kubeconfig pointing at the docker-bridge LoadBalancer IP (e.g.172.18.255.201:6443), which is not routable from the macOS/Windows host, sokubectl get nodeshung. Two smaller copy-paste hazards in the documentedcreatecommand: it required--provider(2 local PCs) and a machine-specific--lb-pool.Changes
cluster kubeconfigestablishes a backgroundkubectl port-forwardto the tenant API server service (via the host-reachable management cluster) and rewrites the kubeconfig tohttps://127.0.0.1:<port>, preserving the original host astls-server-nameso the server cert (SANs include the bridge IP) still verifies. Reused across runs, detached so the follow-upkubectlworks. On Linux the bridge IP is reachable directly, so the kubeconfig is emitted verbatim. Applies to stdout,-o, and--merge.cluster createderives the LoadBalancer pool from the kind docker network for local clusters when--lb-poolis omitted (mirrorsbootstrap local), so the documented create command works without a machine-specific flag.cluster kubeconfig.Verification (macOS, published artifacts, no --from-source)
Full literal walkthrough, copy-paste as documented:
All three kubeconfig output paths (stdout /
-o/--merge) verified.go vetclean, tests pass.Pairs with the docs fix in butlerdotdev/butler (local.mdx).