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

Show Asset prices on kubectl #78

Open
dwbrown2 opened this issue May 4, 2021 · 5 comments
Open

Show Asset prices on kubectl #78

dwbrown2 opened this issue May 4, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@dwbrown2
Copy link
Contributor

dwbrown2 commented May 4, 2021

It would be really cool to support kubectl cost assets so you could see the fully cost of nodes, LBs, etc in your cluster! This is available in kubecost APIs we just need to expose to the CLI.

@michaelmdresser michaelmdresser added the enhancement New feature or request label May 4, 2021
@michaelmdresser
Copy link
Contributor

API reference: https://github.com/kubecost/docs/blob/master/assets.md#assets-api

Good idea. What do you think the columns of the table should be? Each asset type has different data worth displaying. Maybe we break it down further as kubectl cost assets TYPE? If we did that, we could also have kubectl cost assets just display total costs for each asset type.

@dwbrown2
Copy link
Contributor Author

dwbrown2 commented May 5, 2021

My default would something similar to kubectl get nodes! So along the lines of the following:

NAME                                         STATUS   TYPE               AGE   MONTHLY COST
gke-new-kc-demo-default-pool-50db4258-2yg7   Ready    node:n1-standard   11d   $12.20
gke-new-kc-demo-default-pool-50db4258-5yga   Ready    node:n1-standard   11d   $12.20

What do you think? Might need to think more about applying this to other asset types, e.g. LBs...

@michaelmdresser
Copy link
Contributor

Looks great. I think implementing this will also serve as an opportunity to refactor out the usage of /aggregatedCostModel in favor of /allocation if we can and tie commands a little more closely to the APIs they access. With that, adding more commands could become even easier.

@michaelmdresser
Copy link
Contributor

For separately tracking the removal of /aggregatedCostModel: #90

@kaelanspatel
Copy link
Contributor

With v0.2.4 the node subcommand is live. We definitely want to expand on this; #95 should make adding more assets relatively easy.

I think a variation of @michaelmdresser's idea above is good, where we have kubectl ASSET-TYPE subcommands like we have kubectl node, as well as a general kubectl assets which gives a holistic cost breakdown by each asset type as the assets.html?agg=type kubecost page does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants