# Node problem using k3d

**URL:** <https://forums.suse.com/t/node-problem-using-k3d/19586>\
**Category:** k3s, k3OS, and k3d\
**Created:** [February 20, 2021, 9:30pm UTC](https://forums.suse.com/t/node-problem-using-k3d/19586 "2021-02-20T21:30:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dinmen](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@dinmen](https://forums.suse.com/u/dinmen)\
**Post date:** [February 20, 2021, 9:30pm UTC](https://forums.suse.com/t/node-problem-using-k3d/19586/1 "2021-02-20T21:30:36Z")

</div>

Hi,  
this is my first post in this forum.  
I’m trying to get a single-node cluster running on my x86 NAS using k3d.  
There is a problem about the nodes.

But first let’s see, what I did:

> k3d cluster create nas

Result:

> INFO[0000] Prep: Network  
> INFO[0000] Created network ‘k3d-nas’  
> INFO[0001] Created volume ‘k3d-nas-images’  
> INFO[0002] Creating node ‘k3d-nas-server-0’  
> INFO[0003] Creating LoadBalancer ‘k3d-nas-serverlb’  
> INFO[0004] Starting cluster ‘nas’  
> INFO[0004] Starting servers…  
> INFO[0004] Starting Node ‘k3d-nas-server-0’  
> INFO[0019] Starting agents…  
> INFO[0019] Starting helpers…  
> INFO[0019] Starting Node ‘k3d-nas-serverlb’  
> INFO[0024] (Optional) Trying to get IP of the docker host and inject it into the cluster as ‘host.k3d.internal’ for easy access  
> INFO[0039] Successfully added host record to /etc/hosts in 2/2 nodes and to the CoreDNS ConfigMap  
> INFO[0039] Cluster ‘nas’ created successfully!  
> INFO[0039] --kubeconfig-update-default=false → sets --kubeconfig-switch-context=false  
> INFO[0040] You can now use it like this:  
> kubectl config use-context k3d-nas  
> kubectl cluster-info

At the first glance everything seems to be ok:

Output of “k3d node list”:

> NAME ROLE CLUSTER STATUS  
> k3d-nas-server-0 server nas running  
> k3d-nas-serverlb loadbalancer nas running

Output of “kubectl cluster-info”

> Kubernetes control plane is running at `https://0.0.0.0:34735`  
> CoreDNS is running at `https://0.0.0.0:34735/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy`  
> Metrics-server is running at `https://0.0.0.0:34735/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy`
> 
> To further debug and diagnose cluster problems, use ‘kubectl cluster-info dump’.

Output of “kubectl get componentstatus”

> Warning: v1 ComponentStatus is deprecated in v1.19+  
> NAME STATUS MESSAGE ERROR  
> scheduler Healthy ok  
> controller-manager Healthy ok

**But - and here is the problem - output of “kubectl get nodes”:**

> No resources found

So if there is no node in the cluster, it’s no wonder that calling “kubectl get pods -A” shows all nodes in pending state:

> NAMESPACE NAME READY STATUS RESTARTS AGE  
> kube-system helm-install-traefik-6cn4p 0/1 Pending 0 4m4s  
> kube-system local-path-provisioner-7c458769fb-j4hc8 0/1 Pending 0 4m4s  
> kube-system metrics-server-86cbb8457f-f7frc 0/1 Pending 0 4m4s  
> kube-system coredns-854c77959c-pnx75 0/1 Pending 0 4m4s

Another problem that could point to the same problem is, that k3d hangs when initializing a cluster with the server and agent option: “k3d cluster create nas -s 1 -a 1”

> INFO[0000] Prep: Network  
> INFO[0000] Created network ‘k3d-nas’  
> INFO[0000] Created volume ‘k3d-nas-images’  
> INFO[0001] Creating node ‘k3d-nas-server-0’  
> INFO[0002] Creating node ‘k3d-nas-agent-0’  
> INFO[0004] Creating LoadBalancer ‘k3d-nas-serverlb’  
> INFO[0004] Starting cluster ‘nas’  
> INFO[0004] Starting servers…  
> INFO[0004] Starting Node ‘k3d-nas-server-0’  
> INFO[0021] Starting agents…  
> INFO[0021] Starting Node ‘k3d-nas-agent-0’

And that’s it. The k3d command seems to hang. The --verbose option shows it:

> […]  
> INFO[0004] Starting cluster ‘nas’  
> INFO[0004] Starting servers…  
> DEBU[0004] Node k3d-nas-server-0 Start Time: 2021-02-20 22:15:53.002122564 +0100 CET m=+4.736044036  
> INFO[0004] Starting Node ‘k3d-nas-server-0’  
> DEBU[0007] Waiting for node k3d-nas-server-0 to get ready (Log: ‘k3s is up and running’)  
> DEBU[0019] Finished waiting for log message ‘k3s is up and running’ from node ‘k3d-nas-server-0’  
> INFO[0019] Starting agents…  
> DEBU[0019] Node k3d-nas-agent-0 Start Time: 2021-02-20 22:16:07.87600108 +0100 CET m=+19.609922560  
> INFO[0019] Starting Node ‘k3d-nas-agent-0’  
> DEBU[0023] Waiting for node k3d-nas-agent-0 to get ready (Log: ‘Successfully registered node’)

Some additional infos:

- k3d version v4.2.0
- k3s version v1.20.2-k3s1
- docker version 18.09.8
- NAS: Synology DS 218+ (10 GB RAM)

I recently got a k3os cluster running on my NAS using a virtual machine. Then I stumbled upon k3d and thought it would be a slightly more lightweight option to run k3s using docker than using a VM. This VM was switched off while trying to use k3d. I also delete .kube/config and .kube/cache before creating the k3d cluster.

I have no idea what’s the problem. I did some hours of searching, read several k3d tutorials but found no solution.  
Any help would be appreciated!  
Thanks in advance.
