vscode-k3d icon indicating copy to clipboard operation
vscode-k3d copied to clipboard

On create cluster after a default install, script hangs and never creates the cluster

Open JuanValencia opened this issue 3 years ago • 11 comments

I see the k3d command in the output console, but nothing after that.

I would expect to see what I see if I run k3d in the command line, which is the creation of registry, server, etc.

JuanValencia avatar Feb 18 '21 18:02 JuanValencia

Hi @JuanValencia, do you have any logs? could you copy&paste the output you see in the k3d view? what version of k3d is it using?

inercia avatar Feb 23 '21 13:02 inercia

Closed because of inactivity. Please reopen if you want.

inercia avatar Apr 22 '21 12:04 inercia

Hi @inercia sorry to tag onto this, im having the exact same issue, when i try to create a cluster, i get the pop up saying creating cluster, but nothing happens apart from sitting there the only sorta logs i can find is the output window which shows the following

[images proposals]  12 images obtained
[installer] already found at /usr/local/bin/k3d
$ /usr/local/bin/k3d registry list -o json 

[installer] already found at /usr/local/bin/k3d
$ /usr/local/bin/k3d cluster list -o json 

[installer] already found at /usr/local/bin/k3d
$ /usr/local/bin/k3d cluster create k3d-cluster-273 --servers 1 --kubeconfig-update-default

extra info below: Mac OS 10.15.7 VSCode 1.59.1 kubernetes 3kd v0.0.10 extension k3d version v4.4.8 k3s version v1.21.3-k3s1 (default)

si458 avatar Sep 02 '21 16:09 si458

@inercia i can confirm running the commands manually in terminal works no problems

Simon@SiMacBookPro ~ %  /usr/local/bin/k3d registry list -o json 
[]
Simon@SiMacBookPro ~ % /usr/local/bin/k3d cluster list -o json 
[]
Simon@SiMacBookPro ~ % /usr/local/bin/k3d cluster create k3d-cluster-273 --servers 1 --kubeconfig-update-default
INFO[0000] Prep: Network                                
INFO[0000] Created network 'k3d-k3d-cluster-273' (ddda2c3948877018e57e59327f4c97c348148f0568312dfe02b51dc8bef0cce8) 
INFO[0000] Created volume 'k3d-k3d-cluster-273-images'  
INFO[0001] Creating node 'k3d-k3d-cluster-273-server-0' 
INFO[0003] Pulling image 'docker.io/rancher/k3s:v1.21.3-k3s1' 
INFO[0014] Creating LoadBalancer 'k3d-k3d-cluster-273-serverlb' 
INFO[0016] Pulling image 'docker.io/rancher/k3d-proxy:4.4.8' 
INFO[0020] Starting cluster 'k3d-cluster-273'           
INFO[0020] Starting servers...                          
INFO[0020] Starting Node 'k3d-k3d-cluster-273-server-0' 
INFO[0027] Starting agents...                           
INFO[0027] Starting helpers...                          
INFO[0027] Starting Node 'k3d-k3d-cluster-273-serverlb' 
INFO[0028] (Optional) Trying to get IP of the docker host and inject it into the cluster as 'host.k3d.internal' for easy access 
WARN[0029] Failed to patch CoreDNS ConfigMap to include entry '192.168.65.2 host.k3d.internal': Exec process in node 'k3d-k3d-cluster-273-server-0' failed with exit code '1' 
INFO[0029] Successfully added host record to /etc/hosts in 2/2 nodes 
INFO[0029] Cluster 'k3d-cluster-273' created successfully! 
INFO[0029] --kubeconfig-update-default=false --> sets --kubeconfig-switch-context=false 
INFO[0029] You can now use it like this:                
kubectl config use-context k3d-k3d-cluster-273
kubectl cluster-info
Simon@SiMacBookPro ~ % kubectl config use-context k3d-k3d-cluster-273
Switched to context "k3d-k3d-cluster-273".
Simon@SiMacBookPro ~ % kubectl cluster-info 
Kubernetes control plane is running at https://0.0.0.0:51067
CoreDNS is running at https://0.0.0.0:51067/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://0.0.0.0:51067/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

si458 avatar Sep 02 '21 16:09 si458

Hi @si458, thanks for your report, I can confirm I'm seeing the same behavior. I will investigate. I guess there must have been some change in the vscode dependencies...

inercia avatar Sep 03 '21 10:09 inercia

Same issue here:

Mac OS 12.0.1
VSCode 1.62.0
kubernetes 3kd v0.0.10 extension
k3d version v5.0.3

kalinon avatar Nov 09 '21 17:11 kalinon

Any updates here?

plsnotracking avatar Jun 21 '22 23:06 plsnotracking

Just ran into this issue myself :man_facepalming:

kaihendry avatar Aug 03 '22 01:08 kaihendry

I think this is a problem in one of the dependencies, and it seems it only happens on Mac.

"TypeError: The \"file\" argument must be of type string. Received an instance of String
    at new NodeError (node:internal/errors:371:5)
    at validateString (node:internal/validators:119:11)
    at normalizeSpawnArguments (node:child_process:512:3)
    at spawn (node:child_process:711:13)
    at Observable._subscribe (/Users/alvaro/Development/vscode-k3d/node_modules/spawn-rx/lib/src/index.js:183:1)
    at Observable._trySubscribe (/Users/alvaro/Development/vscode-k3d/node_modules/rxjs/_esm5/internal/Observable.js:43:1)
    at Observable.subscribe (/Users/alvaro/Development/vscode-k3d/node_modules/rxjs/_esm5/internal/Observable.js:29:1)
    at Object.execTracking (/Users/alvaro/Development/vscode-k3d/src/utils/shell.ts:96:17)
    at invokeK3DCommandTracking (/Users/alvaro/Development/vscode-k3d/src/k3d/k3d.ts:66:15)
    at Object.createCluster (/Users/alvaro/Development/vscode-k3d/src/k3d/k3d.ts:80:16)
    at /Users/alvaro/Development/vscode-k3d/src/commands/createCluster.ts:83:31
    at Generator.next (<anonymous>)
    at fulfilled (/Users/alvaro/Development/vscode-k3d/dist/extension.js:10993:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)"

I've tried updating the dependencies but it is still failing. I'm still investigating...

inercia avatar Aug 05 '22 08:08 inercia

Samme issue here:

Ubuntu 20.04.4 LTS
VSCode 1.70.1
Kubernetes k3d v0.0.10
k3d v5.4.4

JohanNicander avatar Aug 17 '22 09:08 JohanNicander

Hi, same issue as well, any update on this and yes, I am also on a Mac....

Evantage-WS avatar Sep 07 '22 14:09 Evantage-WS