By batdevis
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
metadata:
annotations:
kubernetes.io/ingress.class: nginx
...
name: app
namespace: default
...
spec:
rules:
- host: ***.com
http:
paths:
- 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
status:
loadBalancer:
ingress:
- ip: ***
but I got an error:
» kubectl describe ingress/app
Name: app
Namespace: default
..
Rules:
Host Path Backends
---- ---- --------
***
/api api:80 (***:3000)
...
/log loki-grafana:80 (<error: endpoints "loki-grafana" not found>)
Annotations: kubernetes.io/ingress.class: nginx
meta.helm.sh/release-name: qme
meta.helm.sh/release-namespace: default
nginx.ingress.kubernetes.io/ssl-redirect: false
nginx.ingress.kubernetes.io/use-regex: true
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
...
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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.