feat: Provide proxy APIs for users to access member cluster resources #309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What would you like to be added?
Provide proxy API for users to access member cluster resources
Why is this needed?
Users may need to check the distribution of application resources in each member cluster. And Users do not want to log in to each cloud provider’s website or switch the kubeconfig context. It will greatly improve the convenience for users to use kubeAdmiral if we provide the proxy APIs to access member cluster resources.
Fixes: #261
A new aggregated apiserver component is introduced to implement the capabilities of proxy API for users to access member cluster resources.
Usage
You can use make local-up to try it.
kubectl get --kubeconfig $HOME/.kube/kubeadmiral/kubeadmiral.config --context kubeadmiral-host --raw /apis/aggregated.kubeadmiral.io/v1alpha1/aggregations/{clustername}/proxy/api/v1/nodes(pods, services etc.)
example:
kubectl get --kubeconfig $HOME/.kube/kubeadmiral/kubeadmiral.config --context kubeadmiral-host --raw /apis/aggregated.kubeadmiral.io/v1alpha1/aggregations/kubeadmiral-member-1/proxy/api/v1/nodes
cc @mrlihanbo