Giter Site home page Giter Site logo

Comments (8)

dwbrown2 avatar dwbrown2 commented on August 23, 2024

@jessegoodier do you know what version of kubectl cost you're running?

@michaelmdresser @teevans for triage

from kubectl-cost.

jessegoodier avatar jessegoodier commented on August 23, 2024

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.

jessegoodier avatar jessegoodier commented on August 23, 2024

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.

kc-creynold avatar kc-creynold commented on August 23, 2024

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.

teevans avatar teevans commented on August 23, 2024

@michaelmdresser - Can you take a look here?

from kubectl-cost.

michaelmdresser avatar michaelmdresser commented on August 23, 2024

@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.

jessegoodier avatar jessegoodier commented on August 23, 2024

quick test works in nightly.

from kubectl-cost.

michaelmdresser avatar michaelmdresser commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.