Description
Is your feature request related to a problem? Please describe.
k0s status
is a good command. It would be even better if it could tell us more about the CNI's health directly. This would help a lot of people figure out network problems faster.
When i set up k0s with Calico using my automation script, i need to know when Calico is really ready. It's not just about the k0s API being up. Calico has its own controllers, like calico-kube-controllers
, that need to be running. It also creates Custom Resource Definitions (CRDs) in Kubernetes, like ippools.projectcalico.org
, and these need to be active and working.
Right now, my script has to do a lot of extra steps after k0s status
says the API is fine. I use kubectl
to check if the Calico deployments are ready. Then i use more kubectl
commands to see if the Calico CRDs are established. Sometimes i even have to add time.sleep()
calls because these Calico parts can take a bit longer to get going, even after the k0s API seems ready. This means my script has many separate kubectl
calls and custom polling just for Calico.
If k0s status
could give a clear signal about CNI health, things would be simpler. My script could just check k0s status
. I wouldn't need so many specific kubectl
calls just for Calico. It would make the question "is the cluster network actually working?" much easier to answer.
I think this would be useful for other people too.
When pods have network trouble, the CNI is often the first thing to check. A quick CNI status from k0s status
would be a great help for debugging.
Anyone automating k0s with Calico, or other CNIs k0s might manage by default, would find it easier to confirm the network is truly ready. It helps quickly see if a problem is with k0s itself, the CNI, or something else like an application. Since k0s often deploys and manages the CNI, it makes sense for k0s to report on its status too.
Describe the solution you would like
Here's an idea of how it could look. When i run sudo k0s status
, maybe the output could add something like this:
Version: v1.28.5+k0s.0
Process ID: 253118
Role: controller
Workloads: true
SingleNode: false
Kube-api probing successful: true
Kube-api probing last error:
CNI Provider: Calico
CNI Status: Healthy
Controllers Ready: calico-kube-controllers, calico-node
Critical CRDs Established: ippools.projectcalico.org, clusterinformations.projectcalico.org
And if something was wrong:
CNI Provider: Calico
CNI Status: Degraded
Controllers Ready: calico-node (calico-kube-controllers pending)
Critical CRDs Established: clusterinformations.projectcalico.org (ippools.projectcalico.org not established)
CNI Last Error: [some brief error from Calico components if k0s can get it]
Another option could be a subcommand like k0s status cni
that gives this detailed CNI breakdown.
Either way, this would give a clearer picture of the network health right from a core k0s command, making k0s feel more complete for the components it manages.
Thanks.
Describe alternatives you've considered
No response
Additional context
No response