https://rancher.com/ logo
Title
r

rapid-businessperson-28408

11/07/2022, 7:23 PM
Do I have something misconfigured to where K3s isn't showing me the pods in kube-system? Things like etcd, the api, and the controllers? I assume those are just running as crictl containers, do I need to enable something for the k8s api to see them?
I know RKE2 shows that, maybe k3s just.. doesn't?
c

creamy-pencil-82913

11/07/2022, 7:24 PM
there aren’t any pods for these things
https://docs.k3s.io/
Operation of all Kubernetes control plane components is encapsulated in a single binary and process.
they’re all running in the main k3s process, sharing the same memory and caches. That’s one of the things that makes K3s so much more memory efficient than other distros.
r

rapid-businessperson-28408

11/07/2022, 7:25 PM
ahh nice okay
Any clean way to see the logs for those then?
Other than sshing in and tailing the k3s log?
c

creamy-pencil-82913

11/07/2022, 7:25 PM
look at the k3s logs. they’re all mixed together in there.
r

rapid-businessperson-28408

11/07/2022, 7:26 PM
Got it, okay. Curiosity got the better of me when I was looking to move over to Cilium, maybe a good time to migrate over to RKE2 then.
c

creamy-pencil-82913

11/07/2022, 7:26 PM
Kubernetes uses klog which sets up a global logger. there’s no way to split out the component logs to separate files.
you should be able to use cilium on k3s just fine, if you disable flannel…
why would you need to switch to rke2?
r

rapid-businessperson-28408

11/07/2022, 7:28 PM
Well mostly because I like having those separate pods, but partially also since I've already got a pretty heavily used cluster, migrating CNIs seems to be a huge pita.
c

creamy-pencil-82913

11/07/2022, 7:28 PM
The only significant difference between the two is that rke2 runs the components in static pods
r

rapid-businessperson-28408

11/07/2022, 7:28 PM
Yeah, I do kinda want to have things be a little bit closer to k8s native
c

creamy-pencil-82913

11/07/2022, 7:28 PM
the rest of the code is directly imported from k3s
r

rapid-businessperson-28408

11/07/2022, 7:28 PM
I like seeing the actual pods for it
I'm also unsure of loe to actually migrate cnis on a running cluster.
May end up doing a backup, spin up a new 'cluster' and then restore the etcd to a new master.
And have it start fresh.
And just stick to k3s
c

creamy-pencil-82913

11/07/2022, 7:29 PM
we don’t support switching CNIs after the cluster is up, no
r

rapid-businessperson-28408

11/07/2022, 7:29 PM
yeah
I mean, nothing really supports that, so no throwing shade on k3s by any means
You have any examples of anyone using something like Promtail or some kind of log aggregator to pull from the k3s node logs and jam it into some kind of aggregation tool?
Maybe have to do privileged on the log collector pods.
c

creamy-pencil-82913

11/07/2022, 8:13 PM
not specifically. any of the normal tools that pull from journald should work.