Skip to content

Commit

Permalink
kubernetes: add complete set of manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
brancz committed Mar 24, 2017
1 parent 042a59e commit cbd33a2
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 19 deletions.
17 changes: 0 additions & 17 deletions kubernetes/deployment.yml

This file was deleted.

13 changes: 13 additions & 0 deletions kubernetes/kube-state-metrics-cluster-role-binding.yaml
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: ClusterRoleBinding
metadata:
name: kube-state-metrics
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kube-state-metrics
subjects:
- kind: ServiceAccount
name: kube-state-metrics
namespace: kube-system

Expand Up @@ -8,10 +8,12 @@ rules:
- nodes
- pods
- resourcequotas
- replicationcontrollers
verbs: ["list", "watch"]
- apiGroups: ["extensions"]
resources:
- daemonsets
- deployments
- replicasets
verbs: ["list", "watch"]

33 changes: 33 additions & 0 deletions kubernetes/kube-state-metrics-deployment.yaml
@@ -0,0 +1,33 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kube-state-metrics
namespace: kube-system
spec:
replicas: 2
template:
metadata:
labels:
k8s-app: kube-state-metrics
spec:
serviceAccountName: kube-state-metrics
containers:
- name: kube-state-metrics
image: gcr.io/google_containers/kube-state-metrics:v0.4.1
ports:
- name: http-metrics
containerPort: 8080
readinessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
requests:
memory: 30Mi
cpu: 100m
limits:
memory: 50Mi
cpu: 200m

6 changes: 6 additions & 0 deletions kubernetes/kube-state-metrics-service-account.yaml
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-state-metrics
namespace: kube-system

@@ -1,15 +1,18 @@
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/scrape: 'true'
name: kube-state-metrics
namespace: kube-system
labels:
k8s-app: kube-state-metrics
annotations:
prometheus.io/scrape: 'true'
spec:
ports:
- name: http-metrics
port: 8080
targetPort: http-metrics
protocol: TCP
selector:
k8s-app: kube-state-metrics

0 comments on commit cbd33a2

Please sign in to comment.