-
Notifications
You must be signed in to change notification settings - Fork 82
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
[RFE] Add support for OpenCost in KubePlus #1287
Comments
Do we know what is the data format expected by opencost? We have a kubectl plugin (kubectl metrics), which collects per-application resource consumption metrics (CPU, memory, storage, network ingress, network egress). We can enhance this plugin to generate output that is expected by opencost. |
@devdattakulkarni I deployed For more deep integration with kubeplus we can use opencost api or kubectl plugin We can use a hybrid approach of using opencost kubectl plugin and wrapping it around by kubeplus additionally if we require custom kubeplus oriented features which are not already present in opencost kubectl plugin we can implement it using opencost API. |
Thanks for trying out opencost @chiukapoor Is the cost calculated from the time the application/namespace is created? Also, can opencost tell us what all Pods are considered when calculating the cost for a given namespace? (I assume that all the Pods in a namespace are being used, but it will be good to verify). I think it will be good to add a kubeplus kubectl plugin, rather than telling users to install opencost and then use opencost plugin. From multi-instance multi-tenancy perspective, knowing the ongoing spend per application instance will be useful for application providers. So we should provide this functionality as part of kubeplus. We can call the plugin The input for the plugin can look as follows: The command inputs are similar to The plugin will check if opencost is running on the cluster first. If it is running then it can call the opencost api to retrieve cost for the namespace corresponding to the app name. Share your thoughts. I am excited to get this functionality included as part of KubePlus. Also, it seems it will be straightforward to add. |
Yes, it considers that the cost for all the pods is calculated for a given namespace.
The user will need to install opencost to use the functionality, what we can do is have a script which installs Kubeplus and the script will have a parameter that the user can pass to install opencost as well for the cost calculation functionality.
Yes, I am looking for the possibility of wrapping kubecost plugin in kubeplus kubectl plugin so that we can use all the kubecost plugin commands directly inside kubeplus kubectl plugin. |
@chiukapoor Sounds like a good plan. |
@chiukapoor I have added some suggestions on the PR related to this issue: |
Description:
As KubePlus aims to provide a comprehensive solution for managing multi-instance multi-tenancy (MIMT) applications on Kubernetes, it would be beneficial to integrate support for OpenCost into the project.
Overview:
OpenCost is a cost management platform that provides insights and analytics into resource utilization and spending within Kubernetes clusters. By adding support for OpenCost into KubePlus, users will gain visibility into the resource consumption and associated costs of each application instance deployed using KubePlus.
Proposal:
Integration: Implement functionality within KubePlus to capture resource consumption data for each application instance.
Data Export: Define an interface for exporting resource consumption data to OpenCost in a compatible format.
Documentation: Update KubePlus documentation to include instructions on configuring and using the OpenCost integration.
Testing: Conduct thorough testing to ensure the reliability and accuracy of the OpenCost integration.
Benefits:
Cost Visibility: Users will have clear insights into each application instance's resource usage and associated costs.
Optimization: With visibility into resource consumption, users can optimize their deployments to minimize costs and maximize efficiency.
Billing: Enables billing and chargeback mechanisms based on actual resource usage.
The text was updated successfully, but these errors were encountered: