Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of GetStatsSummary and GetMetricsResource for Virtual Kubelet #163

Merged
merged 4 commits into from
Dec 27, 2024

Conversation

enrichman
Copy link
Collaborator

@enrichman enrichman commented Dec 19, 2024

Ref:


This PR implements the GetStatsSummary and GetMetricsResource methods for Virtual Kubelet.

To check the metrics these two commands can be run against the virtual cluster:

kubectl get --raw "/api/v1/nodes/k3k-example-cluster-kubelet/proxy/metrics/resource"
kubectl get --raw "/api/v1/nodes/k3k-example-cluster-kubelet/proxy/stats/summary"

The data from the Node are the one of the node where the virtual kubelet is running, while the pods are the one owned by the virtual clusters.

To use the node and node/proxy we'll need a new ClusterRole, and a ClusterRoleBinding for the kubelet. The ClusterRoleBinding will be updated from the K3k controller when a new cluster is created or deleted, adding or removing the kubelet ServiceAccount.

Note: the collector used is copied from the Azure ACI virtual kubelet implementation.

@enrichman enrichman marked this pull request as ready for review December 20, 2024 11:53
@enrichman enrichman changed the title [WIP] Implementation of GetStatsSummary and GetMetricsResource for Virtual Kubelet Implementation of GetStatsSummary and GetMetricsResource for Virtual Kubelet Dec 20, 2024
@enrichman enrichman merged commit 7fdd48d into rancher:main Dec 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants