karmada
karmada copied to clipboard
Is there any way to watch the resource of member cluster(eg. Pods) through the karmada control plane using client api
Please provide an in-depth description of the question you have:
What do you think about this question?: I need to watch the pods in the member cluster through karmada. I know I can use the --watch in the karmadactl get cmd, But how to get the watch feature through client api? Environment:
- Karmada version: karmadactl version: version.Info{GitVersion:"v1.8.1", GitCommit:"7b1f8dcbb6f44b6ecfa8a62c4b6a3618c8887e81", GitTreeState:"clean", BuildDate:"2023-12-19T01:51:35Z", GoVersion:"go1.20.12", Compiler:"gc", Platform:"linux/amd64"}
- Kubernetes version: Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.6", GitCommit:"ff2c119726cc1f8926fb0585c74b25921e866a28", GitTreeState:"clean", BuildDate:"2023-01-18T19:22:09Z", GoVersion:"go1.19.5", Compiler:"gc", Platform:"linux/amd64"} Kustomize Version: v4.5.7 Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.6", GitCommit:"ff2c119726cc1f8926fb0585c74b25921e866a28", GitTreeState:"clean", BuildDate:"2023-01-18T19:15:26Z", GoVersion:"go1.19.5", Compiler:"gc", Platform:"linux/amd64"}
- Others:
Hi @fizos You can try to use the Cluster proxy capability: https://karmada.io/docs/next/userguide/globalview/aggregated-api-endpoint
The karmadactl invokes the API capability internally.
Hi @fizos did my answer help you in any way?