Comments (8)
@jessegoodier do you know what version of kubectl cost you're running?
@michaelmdresser @teevans for triage
from kubectl-cost.
Update, this is not the way to use predict. Though there still seems to be an issue with predic. Is it my client?
this is correct, requires a proper context:
k cost predict -f memory-limit-eq-request.yaml
using kubectl v1.25.4
error:
k cost predict -f memory-limit-eq-request.yaml
Error: Failed querying the speccost API. This API requires a version of Kubecost >= 1.101, which may be why this query failed. If running Kubecost v1.100, you can downgrade kubectl cost to v0.4 for old-style prediction. Error: failed to port forward query: received non-200 status code 500 and data: Failed to predict cost impact of specs: cannot predict impact of nil spec
from kubectl-cost.
update: works on my test cluster, but not kc-demo-prod:
(arn:aws:eks:us-east-2:297945954695:cluster/test-1/jesse) ubuntu@aerog in /home/ubuntu
>k cost predict -f memory-limit-eq-request.yaml
OBJECT Δ QTY RESOURCE UNIT COST PER UNIT Δ COST/MO % CHANGE
───────────────────────────────────────────────────────────────────────────────────────
jesse deployment +44 CPU millicores 0.023 USD +1.01 USD
memory-limit-eq-request
+44 RAM MiB 0.0030 USD +0.13 USD
───────────────────────────────────────────────────────────────────────────────────────
TOTAL MONTHLY COST +1.14 USD
(arn:aws:eks:us-east-2:297945954695:cluster/test-1/jesse) ubuntu@aerog in /home/ubuntu
>kx kc-demo-prod
Switched to context "kc-demo-prod".
(kc-demo-prod/kubecost) ubuntu@aerog in /home/ubuntu
>k cost predict -f memory-limit-eq-request.yaml
Error: Failed querying the speccost API. This API requires a version of Kubecost >= 1.101, which may be why this query failed. If running Kubecost v1.100, you can downgrade kubectl cost to v0.4 for old-style prediction. Error: failed to port forward query: received non-200 status code 500 and data: Failed to predict cost impact of specs: cannot predict impact of nil spec
from kubectl-cost.
some more info on what we are seeing:
kubectl config set-context --current --namespace=kubecost
Context "arn:aws:eks:us-west-2:297945954695:cluster/kc-demo-prod" modified.
$ chris@Christophers-MacBook-Pro ~/src/se-demo/predict_samples predict_samples_initial kubectl cost predict -f small.yaml --log-level debug
2023-04-17T13:12:49.154625-04:00 DBG ServiceName set to: kubecost-cost-analyzer
2023-04-17T13:12:49.154746-04:00 DBG KubecostNamespace set to: kubecost
2023-04-17T13:12:50.177065-04:00 DBG checking readiness of 'kubecost-cost-analyzer-74d4f67bdf-qb2km'
2023-04-17T13:12:50.177091-04:00 DBG selected pod to forward: kubecost-cost-analyzer-74d4f67bdf-qb2km
2023-04-17T13:12:50.426228-04:00 DBG Port-forward set up at: http://localhost:58222/
2023-04-17T13:12:50.432428-04:00 DBG Executing GET to: http://localhost:58222/model/clusterInfo
2023-04-17T13:12:50.678468-04:00 DBG Cluster ID for query set to: kc-demo-prod
2023-04-17T13:12:50.678526-04:00 DBG Executing POST to: http://localhost:58222/model/prediction/speccost?clusterID=kc-demo-prod&defaultNamespace=kubecost&noUsage=false&windowAvgUsage=2d&windowResourceCost=7d+offset+48h
Error: Failed querying the speccost API. This API requires a version of Kubecost >= 1.101, which may be why this query failed. If running Kubecost v1.100, you can downgrade kubectl cost to v0.4 for old-style prediction. Error: failed to port forward query: received non-200 status code 500 and data: Failed to predict cost impact of specs: cannot predict impact o
```f nil spec
from kubectl-cost.
@michaelmdresser - Can you take a look here?
from kubectl-cost.
@kc-creynold @jessegoodier is this broken in nightly? We have a PR slated for release in 1.103 that should fix this: https://github.com/kubecost/kubecost-cost-model/pull/1383
from kubectl-cost.
quick test works in nightly.
from kubectl-cost.
Closing as this should be fixed in v1.103 of Kubecost. If an error is still occurring, please reopen this issue.
from kubectl-cost.
Related Issues (20)
- Error: GLIBC not found HOT 7
- Feature Request: kubectl cost prices HOT 4
- some label queries don't work HOT 6
- The logs report didn't get PVC pricing in Alicloud
- Disregard
- Predict command is not working through proxy HOT 2
- Add `--opencost` flag to specify standard OpenCost settings HOT 3
- [Feature Request] Give users ability to use kubectl cost functionality without having to escalate privlages. HOT 1
- Security Slam 2023 Participation HOT 1
- Support request ro HTTPS oauth proxy sidecar HOT 1
- A potential risk of kubecost makes a worker node get the token of any Service Account HOT 2
- [FR/BUG] Show __idle__ costs (again) using OpenCost HOT 4
- OpenCost dependency is old HOT 1
- Update used libraries to mitigate CVE scanners HOT 2
- cost-model container is running and responding to the healthz endpoint, but the response is empty. HOT 2
- Broken docs link.... HOT 5
- kubecost cost cli predict fails on 2.2.x HOT 1
- Building kubecost fails due to go1.16 being used in go.mod HOT 3
- kubectl cost predict -f test.yaml Not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubectl-cost.