Comments (3)
Hi @btfo, can you please check the prometheus logs and make sure you don't have any error similar to this:
level=error ts=2018-01-22T15:42:34.436552996Z caller=main.go:211 component=k8s_client_runtime err="github.com/prometheus/prometheus/discovery/kubernetes/kubernetes.go:178: Failed to list *v1.Service: services is forbidden: User \"system:serviceaccount:monitoring:prometheus-k8s\" cannot list services in the namespace \"nginx-ingress\""
I think that by default RBAC isn't configured to allow listing services on other namespaces than default
, kube-system
and monitoring
I'm using a different method to monitor the nginx-ingress by setting enable-vts-status: "true"
in ingress-nginx
configmap Ref: here and I can share it if the RBAC isn't the issue.
from prometheus-kubernetes.
Hi @btfo, can you please check the prometheus logs and make sure you don't have any error similar to this:
I've checked the logs of the prometheus
pod and was unable to find anything relevant
I'm using a different method to monitor the nginx-ingress by setting <...>
Please do share!
from prometheus-kubernetes.
@btfo Here it is:
apiVersion: v1
data:
enable-vts-status: "true"
use-proxy-protocol: "true"
kind: ConfigMap
metadata:
labels:
k8s-addon: ingress-nginx.addons.k8s.io
name: ingress-nginx
namespace: nginx-ingress
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
k8s-addon: ingress-nginx.addons.k8s.io
k8s-app: nginx-ingress
name: ingress-nginx
namespace: nginx-ingress
spec:
replicas: 1
selector:
matchLabels:
app: ingress-nginx
k8s-addon: ingress-nginx.addons.k8s.io
k8s-app: nginx-ingress
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: ingress-nginx
k8s-addon: ingress-nginx.addons.k8s.io
k8s-app: nginx-ingress
spec:
containers:
- args:
- /nginx-ingress-controller
- --default-backend-service=$(POD_NAMESPACE)/nginx-default-backend
- --configmap=$(POD_NAMESPACE)/ingress-nginx
- --publish-service=$(POD_NAMESPACE)/ingress-nginx
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 10254
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
name: ingress-nginx
ports:
- containerPort: 80
name: http
protocol: TCP
- containerPort: 443
name: https
protocol: TCP
- containerPort: 10254
name: metrics
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
labels:
k8s-app: nginx-ingress
name: nginx-ingress
namespace: nginx-ingress
spec:
ports:
- name: metrics
port: 10254
protocol: TCP
targetPort: metrics
selector:
k8s-app: nginx-ingress
sessionAffinity: None
type: ClusterIP
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
k8s-app: nginx-ingress
name: nginx-ingress-monitor
namespace: monitoring
spec:
endpoints:
- interval: 10s
port: metrics
namespaceSelector:
matchNames:
- nginx-ingress
selector:
matchLabels:
k8s-app: nginx-ingress
from prometheus-kubernetes.
Related Issues (20)
- Grafana service error
- error validating data: [apiVersion not set, kind not set]; HOT 5
- Feature Request: thanos support
- Target Labels are "dropped" HOT 1
- Stuck in Waiting for Operator to register custom resource definitions HOT 3
- Pods/Container metrics not show up in prometheus HOT 1
- AKS - Waiting for Operator to register custom resource definitions.... HOT 1
- Unable to mount volumes for pod
- I want to rest external_labels
- Kubernetes 1.11 update removed heapster HOT 2
- Kubelet Connection Refused HOT 1
- Custom: deploy prometheus-k8s error: error converting YAML to JSON: yaml: line 21 HOT 3
- Updating prometheus configuration
- Custom,minikube, Deploying Prometheus,prometheus-k8s.yaml: error converting YAML to JSON: yaml: line 22: mapping values are not allowed in this context HOT 2
- Where are the grafana dashboards? HOT 1
- Missing pod/container metrics from prometheus,no data point in grafana HOT 2
- Is this repo under the Apache licence? HOT 1
- pod cpu usage graph is wrong.
- Deploy script getting stuck at Waiting for Operator to register custom resource definitions HOT 1
- line 1921: did not find expected key HOT 1
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 prometheus-kubernetes.