Skip to content

Instantly share code, notes, and snippets.

@superbrothers
Last active June 6, 2019 12:14
Show Gist options
  • Save superbrothers/9bd08884405ea4e887a07cc0d96925d2 to your computer and use it in GitHub Desktop.
Save superbrothers/9bd08884405ea4e887a07cc0d96925d2 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: monitoring
name: kube-eagle
labels:
app: kube-eagle
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kube-eagle
labels:
app: kube-eagle
rules:
- apiGroups:
- ""
resources:
- nodes
- pods
verbs:
- get
- list
- apiGroups:
- metrics.k8s.io
resources:
- pods
- nodes
verbs:
- get
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kube-eagle
labels:
app: kube-eagle
subjects:
- kind: ServiceAccount
name: kube-eagle
namespace: monitoring
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kube-eagle
---
apiVersion: v1
kind: Service
metadata:
namespace: monitoring
name: kube-eagle
labels:
app: kube-eagle
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"
spec:
type: ClusterIP
ports:
- port: 8080
targetPort: http
selector:
app: kube-eagle
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: monitoring
name: kube-eagle
labels:
app: kube-eagle
spec:
replicas: 1
selector:
matchLabels:
app: kube-eagle
template:
metadata:
labels:
app: kube-eagle
spec:
serviceAccountName: kube-eagle
containers:
- name: kube-eagle
image: "quay.io/google-cloud-tools/kube-eagle:1.0.0"
env:
- name: PORT
value: "8080"
ports:
- name: http
containerPort: 8080
livenessProbe:
httpGet:
path: /health
port: http
readinessProbe:
httpGet:
path: /health
port: http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment