mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
prometheus operator video files
This commit is contained in:
parent
50117a6a2b
commit
149db75516
@ -26,12 +26,12 @@ spec:
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /status
|
||||
port: 5000
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 3
|
||||
# livenessProbe:
|
||||
# httpGet:
|
||||
# path: /status
|
||||
# port: 5000
|
||||
# initialDelaySeconds: 3
|
||||
# periodSeconds: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
|
@ -2,10 +2,14 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: example-service
|
||||
labels:
|
||||
app: example-app
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: example-app
|
||||
ports:
|
||||
- protocol: TCP
|
||||
name: http
|
||||
port: 80
|
||||
targetPort: 5000
|
@ -0,0 +1,18 @@
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: apps
|
||||
labels:
|
||||
prometheus: prometheus-standalone
|
||||
k8s-app: apps
|
||||
spec:
|
||||
jobLabel: apps
|
||||
selector:
|
||||
matchLabels:
|
||||
app: example-app
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- apps
|
||||
endpoints:
|
||||
- port: http
|
||||
interval: 30s
|
@ -0,0 +1,12 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: prometheus-standalone
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: prometheus-standalone
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: prometheus-standalone
|
||||
namespace: apps
|
@ -0,0 +1,17 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: prometheus-standalone
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources:
|
||||
- services
|
||||
- endpoints
|
||||
- pods
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources:
|
||||
- configmaps
|
||||
verbs: ["get"]
|
||||
- nonResourceURLs: ["/metrics"]
|
||||
verbs: ["get"]
|
@ -0,0 +1,33 @@
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: Prometheus
|
||||
metadata:
|
||||
name: prometheus-standalone
|
||||
labels:
|
||||
prometheus: k8s
|
||||
spec:
|
||||
externalLabels:
|
||||
cluster: docker-desktop
|
||||
replicas: 1
|
||||
version: v2.13.1
|
||||
serviceAccountName: prometheus-standalone
|
||||
serviceMonitorSelector:
|
||||
matchExpressions:
|
||||
- key: k8s-app
|
||||
operator: In
|
||||
values:
|
||||
- apps
|
||||
# - kube-state-metrics
|
||||
# - apiserver
|
||||
# - kubelet
|
||||
# ruleSelector:
|
||||
# matchLabels:
|
||||
# role: alert-rules
|
||||
# prometheus: k8s
|
||||
# resources:
|
||||
# requests:
|
||||
# memory: 400Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: prometheus-standalone
|
Loading…
x
Reference in New Issue
Block a user