Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes - Local Configuration (kubernetes-helm) doesn't work on Windows #111

Open
robv8r opened this issue Jan 25, 2023 · 1 comment
Open

Comments

@robv8r
Copy link

robv8r commented Jan 25, 2023

When using the "Kubernetes - Local Configuration" (kubernetes-helm) Dev Container Template on Windows, an error occurs.

Example of Error:

[67 ms] Dev Containers 0.266.1 in VS Code 1.74.3 (97dec172d3256f8ca4bfb2143f3f76b503ca0534).
[66 ms] Start: Resolving Remote
[89 ms] Setting up container for folder or workspace: c:\path\to\project
[93 ms] Start: Check Docker is running
[94 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[417 ms] Server API version: 1.41
[419 ms] Start: Run: docker volume ls -q
[840 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=c:\path\to\project --filter label=vsch.quality=stable
[1157 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\path\to\project
[1506 ms] Start: Run: C:\Users\username\AppData\Local\Programs\Microsoft VS Code\Code.exe --ms-enable-electron-run-as-node c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\username\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --workspace-folder c:\path\to\project --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\path\to\project --log-level debug --log-format json --config c:\path\to\project\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[1751 ms] (node:26548) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1751 ms] (Use `Code --trace-deprecation ...` to show where the warning was created)
[1754 ms] @devcontainers/cli 0.25.2. Node.js v16.14.2. win32 10.0.22000 x64.
[1754 ms] Start: Run: docker buildx version
[2715 ms] github.com/docker/buildx v0.10.0 876462897612d36679153c3414f7689626251501
[2716 ms] 
[2716 ms] Start: Resolving Remote
[2719 ms] Start: Run: git rev-parse --show-cdup
Running the initializeCommand from devcontainer.json...

[2843 ms] Start: Run: C:\WINDOWS\system32\cmd.exe /c cd .devcontainer && bash ensure-mount-sources
"Ensuring mount points exist..."
A subdirectory or file C:\Users\username\.kube already exists.
A subdirectory or file C:\Users\username\.minikube already exists.

[3283 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\path\to\project
[3654 ms] Start: Run: docker inspect --type image mcr.microsoft.com/devcontainers/base:bullseye
[3968 ms] local container features stored at: c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\node_modules\vscode-dev-containers\container-features
[3970 ms] Start: Run: tar --no-same-owner -x -f -
[4224 ms] * Processing feature: ghcr.io/devcontainers/features/docker-outside-of-docker:1
[4825 ms] * Processing feature: ghcr.io/devcontainers/features/kubectl-helm-minikube:1
[5334 ms] * Processing feature: ./local-features/copy-kube-config
[5334 ms] Local disk feature.
[5334 ms] Local file path parse error. Resolved path must be a child of the .devcontainer/ folder.  Parsed: \c:\path\to\project\.devcontainer\local-features\copy-kube-config
[5336 ms] Error: Failed to process feature ./local-features/copy-kube-config
[5336 ms]     at Pse (c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js:1805:3150)
[5336 ms]     at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[5336 ms]     at async Sm (c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js:1805:2294)
[5336 ms]     at async Jf (c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js:1807:1415)
[5336 ms]     at async Pm (c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js:1807:308)
[5336 ms]     at async EF (c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js:1893:2016)
[5336 ms]     at async uT (c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js:1893:901)
[5336 ms]     at async Poe (c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js:1899:2128)
[5336 ms]     at async Zf (c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js:1899:3278)
[5336 ms]     at async aue (c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js:2020:15276)
[5347 ms] Exit code 1
[5350 ms] Command failed: C:\Users\username\AppData\Local\Programs\Microsoft VS Code\Code.exe --ms-enable-electron-run-as-node c:\Users\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.266.1\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\username\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --workspace-folder c:\path\to\project --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\path\to\project --log-level debug --log-format json --config c:\path\to\project\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[5350 ms] Exit code 1

@samruddhikhandale
Copy link
Member

samruddhikhandale commented Jan 26, 2023

[5334 ms] * Processing feature: ./local-features/copy-kube-config
[5334 ms] Local disk feature.
[5334 ms] Local file path parse error. Resolved path must be a child of the .devcontainer/ folder. Parsed: \c:\path\to\project.devcontainer\local-features\copy-kube-config
[5336 ms] Error: Failed to process feature ./local-features/copy-kube-config

Looks like you are referencing a local Feature? Can you make sure it is placed inside the .devcontainer folder as promoted by the logs and docs.

[2843 ms] Start: Run: C:\WINDOWS\system32\cmd.exe /c cd .devcontainer && bash ensure-mount-sources
"Ensuring mount points exist..."

ℹ️ We have devcontainers/features#384 open to fix the mount target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants