loki grafana, ingress and namespace

I’ve installed from marketplace Grafana Loki into an existing cluster. I’d want to add /log entry into my ingress in order to point to loki-grafana service.

Here’s an extract of my ingress:

» kubectl get ingress/app -o yaml

apiVersion: extensions/v1beta1
kind: Ingress
  annotations: nginx
  name: app
  namespace: default
  - host: ***.com
      - backend:
          serviceName: api
          servicePort: 80
        path: /api
      - backend:
          serviceName: static
          servicePort: 80
        path: /assets
      - backend:
          serviceName: fe
          servicePort: 80
        path: /
      - backend:
          serviceName: loki-grafana
          servicePort: 80
        path: /log
    - ip: ***

but I got an error:

» kubectl describe ingress/app
Name:             app
Namespace:        default
  Host                     Path  Backends
  ----                     ----  --------
                           /api           api:80 (***:3000)
                           /log           loki-grafana:80 (<error: endpoints "loki-grafana" not found>)
Annotations:      nginx

Maybe the problem is that the loki-grafana service is on another namespace?

» kubectl describe services/loki-grafana -n loki 
Name:              loki-grafana
Namespace:         loki

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello @batdevis

To store nginx logs in Grafana Loki you need to make sure all resources are in the same namespace. Try to add the Nginx and Grafana Loki in the same namespace “loki”.

I hope it helps!

Best Regards, Purnima Kumari