karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.34k stars 859 forks source link

I don't know if this is a bug or a feature #5205

Closed IonBoleac closed 1 month ago

IonBoleac commented 1 month ago

What happened: To get all the member clusters I must run the kubectl get cluster command but if i want, for example, to get all provisioned pods i must run kubectl karmada get pod -A. When I run kubectl karmada get cluster this is the output:

      cluster(microk8s): the server doesn't have a resource type "cluster"
      cluster(microk8s-cluster): the server doesn't have a resource type "cluster"

Why is there this separation? Why instead doesn't it do that when I want to interact with the multi-cluster orchestrator I can do it only through the karmada plugin?

PS. I set the env var KUBECONFIG to the karmada.config file

Environment:

XiShanYongYe-Chang commented 1 month ago

Hi @IonBoleac, thanks for your feedback!

Currently, the query of these resources is separated. The separation principle is as follows: For Karmada resources, the kubectl command is used to query the resources. For resources in member clusters, the kubectl karmada command is used to query the resources.

Now, we are planning to implement kubectl karmada to query all the above resources. You can pay attention to it. If you are convenient, you are also welcome to participate in the development or review of the code.

Let me update the labels. /remove-kind bug /kind question

IonBoleac commented 1 month ago

Hello @XiShanYongYe-Chang thanks for your quick answer!

Can you tell me some examples of this response: Currently, the query of these resources is separated. The separation principle is as follows: For Karmada resources, the kubectl command is used to query the resources. For resources in member clusters, the kubectl karmada command is used to query the resources.

I asked this because I know that kubectl karmada is used to get all the resources of the multi-cluster cluster and kubectl is used to get all the resources for only one cluster. Setting opportunity the KUBECONFIF variable.

I think that I don't understand very well this separation.

XiShanYongYe-Chang commented 1 month ago

I asked this because I know that kubectl karmada is used to get all the resources of the multi-cluster cluster and kubectl is used to get all the resources for only one cluster. Setting opportunity the KUBECONFIF variable.

Yeah, you're right.

I think that I don't understand very well this separation.

In fact, there is no special reason. It's an evolving tool. It is convenient to obtain resources on different member clusters through kubectl karmada. Later, we learned from user experience feedback that if we can query resources on the karmada control plane through kubectl karmada, would be more user friendly, so we decided to do that.

IonBoleac commented 1 month ago

@XiShanYongYe-Chang Thanks very much for the responde. BTW i'd like to help the community to improve karmada. Can I do this?

XiShanYongYe-Chang commented 1 month ago

BTW i'd like to help the community to improve karmada. Can I do this?

Of course, you're more than welcome to contribute to the community.

Hi @zhzhuang-zju, do you have a mission description for that? We can split some sub-tasks to let people choose the tasks they are interested in.

zhzhuang-zju commented 1 month ago

@IonBoleac Very welcome~ I'm combing through the sub-task items with @hulizhe right now, which may take a while. I'll let you know as soon as the task is posted~

IonBoleac commented 1 month ago

@zhzhuang-zju Okey, thanks!!! So I'll attend your call

XiShanYongYe-Chang commented 1 month ago

Let's close it first. /close

karmada-bot commented 1 month ago

@XiShanYongYe-Chang: Closing this issue.

In response to [this](https://github.com/karmada-io/karmada/issues/5205#issuecomment-2244728403): >Let's close it first. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.