kubestellar / kubeflex

A flexible and scalable platform for running Kubernetes control plane APIs.
Apache License 2.0
46 stars 13 forks source link

feature: List clusters #159

Open msteinder opened 9 months ago

msteinder commented 9 months ago

Feature Description

It does not appear that kflex cli contains a command to list control planes? That would be very useful.

Proposed Solution

Add a corresponding command.

Want to contribute?

Additional Context

No response

pdettori commented 9 months ago

Control planes are custom resources stored the hosting cluster, so you can just use standard kubectl commands:

$ kubectl get cps
NAME    SYNCED   READY   TYPE       AGE
imbs1   True     True    vcluster   46h
wds1    True     True    k8s        46h

You can do all the usual things with Kube objects, such as adding labels and listing by labels, e.g.

kubectl get cps -l   kflex.kubestellar.io/cptype=wds

NAME   SYNCED   READY   TYPE   AGE
wds1   True     True    k8s    46h
pdettori commented 9 months ago

Would it be ok just to document this ?

msteinder commented 9 months ago

To start with, yes. For a user, it would be more natural not to have to switch between CLIs. I suggest we leave it as an open issue. It is a great initial project for new contributors.