Code Monkey home page Code Monkey logo

Comments (8)

jrphub avatar jrphub commented on May 8, 2024

I used below command, now I able to see grafana dashboard
kubectl expose pod/grafana --type ClusterIP -n openfaas --port 3000

service/grafana exposed

$ kubectl port-forward -n openfaas svc/grafana 3000:3000
but now, the issue is , even if I invoke some functions, it doesn't show any metrics on dashboard.
It's all blank like below

https://imgur.com/rv03iiM.png

from faas-grafana.

d-mg avatar d-mg commented on May 8, 2024

I'm having the same problem trying to expose the deployment after starting up a pod with this image. It only starts a pod and there is no deployment... Is something missing from the readme? Or is it that this needs a deployment template? How does not everyone using this face the same problem?

EDIT (message on slack):
running kubectl version I see
client 1.18.3
server 1.17.3

from faas-grafana.

Waterdrips avatar Waterdrips commented on May 8, 2024

Hi Both,
This looks a lot like the breaking change in kubectl 1.18 to me (you indicated 1.18 kubectl in your messages on slack)

https://medium.com/@alexellisuk/kubernetes-1-18-broke-kubectl-run-heres-what-to-do-about-it-2a88e5fb389a

kubectl run no longer creates a deploymeny, only a pod...

As to the fix for this... well...

export DEPLOYMENT=grafana 

(cat<<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
  name: $DEPLOYMENT
  labels:
    app: grafana
spec:
  replicas: 1
  selector:
    matchLabels:
      run: grafana
  template:
    metadata:
      creationTimestamp: null
      labels:
        run: grafana
    spec:
      containers:
      - image: stefanprodan/faas-grafana:4.6.3
        name: grafana
        ports:
        - containerPort: 3000
EOF
) | kubectl apply -f -

should create the grafana deployment

from faas-grafana.

alexellis avatar alexellis commented on May 8, 2024

You'll need expose pod/ instead of deploy/ since Kubernetes broke the CLI in 1.18

https://medium.com/p/kubernetes-1-18-broke-kubectl-run-heres-what-to-do-about-it-2a88e5fb389a

from faas-grafana.

d-mg avatar d-mg commented on May 8, 2024

Tnx for the replies @Waterdrips @alexellis.
Exposing the pod is what I've been doing now as a work around.
@alexellis thank you for your article on this issue, it explains it really well.
@jrphub @stefanprodan guess this can be closed since it's not a problem with this repo... but I would suggest to update the readme.

from faas-grafana.

alexellis avatar alexellis commented on May 8, 2024

Feel free to send us a PR to the OpenFaaS workshop repo if required.

from faas-grafana.

jrphub avatar jrphub commented on May 8, 2024

Replied with result here
openfaas/workshop#177

from faas-grafana.

jrphub avatar jrphub commented on May 8, 2024

Grafana worked after exposing pod grafana
kubectl -n openfaas expose pod grafana --type=NodePort --name=grafana

Thank you verymuch :) :)

from faas-grafana.

Related Issues (3)

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.