Skip to content

Commit

Permalink
Dynamic provisioning
Browse files Browse the repository at this point in the history
  • Loading branch information
HackToHell committed Mar 8, 2017
1 parent 6a5fb08 commit b2afaa5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
31 changes: 13 additions & 18 deletions 10pvc.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: slow
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-standard
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: datadir-kafka-0
namespace: kafka
annotations:
volume.beta.kubernetes.io/storage-class: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
storage: 10Gi
selector:
matchLabels:
app: kafka
Expand All @@ -20,29 +29,15 @@ apiVersion: v1
metadata:
name: datadir-kafka-1
namespace: kafka
annotations:
volume.beta.kubernetes.io/storage-class: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
storage: 10Gi
selector:
matchLabels:
app: kafka
podindex: "1"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: datadir-kafka-2
namespace: kafka
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
selector:
matchLabels:
app: kafka
podindex: "2"
6 changes: 4 additions & 2 deletions 50kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: kafka
spec:
serviceName: "broker"
replicas: 3
replicas: 2
template:
metadata:
labels:
Expand All @@ -27,8 +27,10 @@ spec:
volumeClaimTemplates:
- metadata:
name: datadir
annotations:
volume.beta.kubernetes.io/storage-class: "slow"
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 200Gi
storage: 8Gi

0 comments on commit b2afaa5

Please sign in to comment.