Repository navigation
Conversation
The devcontainer shares the host's Docker daemon but has its own network namespace. The Kind API's loopback address therefore points back into the devcontainer, causing `kubectl` to fail during setup. When enabled, connect the devcontainer to the Docker `kind` network and export kubeconfig using Kind's internal endpoint. Make `use-kind-cluster` request `--internal` too, so later kubeconfig refreshes keep working. Enable this only in `devcontainer.json`; when unset, host-based workflows retain the default endpoint. Signed-off-by: Pranav Kothare <kothare.pranav@gmail.com>
Signed-off-by: Pranav Kothare <kothare.pranav@gmail.com>
pkothare
force-pushed
the
fix/devcontainer-internal-endpoint
branch
from
November 13, 2026 03:13
a5e9f3c to
088cacb
Compare
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.
The devcontainer shares the host Docker daemon but has its own network namespace. Its loopback address therefore cannot reach the Kind API, causing kubectl setup to fail.
Use the internal endpoint only when the Docker daemon can inspect the devcontainer by hostname. In that case, connect it to the Docker
kindnetwork and export an internal kubeconfig. Share the endpoint check betweensetup-kind.shanduse-kind-clusterso both select the same address.When the container is not visible to the daemon, as in Codespaces-style setups, keep the default loopback endpoint.
Validation:
make open-dev-containercompleted successfully on Linux with Docker.postCreateCommandcompleted successfully in GitHub Codespace on initial setup.