Skip to content

Instantly share code, notes, and snippets.

@shawnho1018
Created August 22, 2022 05:38
Show Gist options
  • Save shawnho1018/9ace2986ff68bcf15812609f4da342d0 to your computer and use it in GitHub Desktop.
Save shawnho1018/9ace2986ff68bcf15812609f4da342d0 to your computer and use it in GitHub Desktop.
prometheus-frontend.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 2
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
automountServiceAccountToken: true
nodeSelector:
kubernetes.io/os: linux
kubernetes.io/arch: amd64
containers:
- name: frontend
image: "gke.gcr.io/prometheus-engine/frontend:v0.4.3-gke.0"
args:
- "--web.listen-address=:9090"
- "--query.project-id=shawn-altostrat"
- "--query.credentials-file=/gmp/key.json"
ports:
- name: web
containerPort: 9090
readinessProbe:
httpGet:
path: /-/ready
port: web
livenessProbe:
httpGet:
path: /-/healthy
port: web
volumeMounts:
- name: gmp-sa
mountPath: /gmp
readOnly: true
volumes:
- name: gmp-sa
secret:
secretName: gmp-test-sa
---
apiVersion: v1
kind: Service
metadata:
name: frontend
spec:
clusterIP: None
selector:
app: frontend
ports:
- name: web
port: 9090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment