Replies: 1 comment
-
Hey @siredmar , thanks for starting this discussion!
I actually think that the final reply (FATAL log) and the informational output are what is returned by the Kubeedge component which fails to get the logs directly from the node. Kubectl itself seems to only connect to the API Server according to the Possibly that lookup ( I didn't play with it yet, so that's just a guess. EDIT: Unfortunately, the devspace commands didn't work for me and happened to modify an existing non-toy cluster 😖 EDIT 2: This part of the devspace config seems to be a bit wrong: https://github.com/edgefarm/devspace.base/blob/main/environments/k3d/devspace.yaml#L25-L32 EDIT 3: There's too much for me to fix first in the devspace setup, so I cannot test it right now... |
Beta Was this translation helpful? Give feedback.
-
Hi!
I'm trying to get kubeedge working in a k3d cluster.
Introduction
Kubeedge allows putting devices, e.g. raspberry pi as node an existing cluster. This allows scheduling workload on these edge nodes and be running even if the device is temporary disconnected from the cluster. There is one part running on the edge devices communication with the other part running in the cluster. The cloud component proxies everything needed for the edge nodes.
Because edge nodes might not be in the same network as the rest of the cluster there is an iptables rule running on the node running the cluster API server that redirects all requests for edge nodes kubelet to the kubeege cloud components stream server port 10003.
See details for the iptables rule
Environment
The environment is setup using devspace and k3d. The kubeedge devices are pure virtual as docker containers running on the same developer machine. See
detail
section for more information about the running cluster with two virtual nodes and a demo application running on these nodes.Kubeconfig:
Nodes:
Kubeedge Pods:
Pods after apply demo application:
Docker containers running locally:
What is the problem?
kubectl logs
does not work for pods running on edge nodes.However, what works is directly using curl to get the logs from the api server.
So the strange about this is that it tries to get the logs directly from the node
node1
and does not try to contact the api server.However, In an RKE1 setup the
kubectl logs
command directly talks to the API server not to the edge node.See details section for a little bit more verbose output and an RKE1 comparison.
This is the output running k3d:
And this is the output running RKE1:
How to setup the environment
Make sure you have k3d and mkcert installed.
These are the steps to start up the environment locally. It starts a new cluster called
k3d-edgefarm-core
and instantiates two virtual docker devices.Next apply this demo application:
Now you can play around with the logs feature (see section above).
What am i missing here?
Beta Was this translation helpful? Give feedback.
All reactions