Skip to content

Commit 50e5ec2

Browse files
committed
added redis statefulset and service
1 parent b560618 commit 50e5ec2

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

test/redis/redis-service.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: redis
6+
spec:
7+
ports:
8+
- port: 6379
9+
targetPort: 6379
10+
selector:
11+
application: redis

test/redis/redist-deployment.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
apiVersion: apps/v1beta1
3+
kind: StatefulSet
4+
metadata:
5+
name: redis
6+
spec:
7+
serviceName: redis
8+
replicas: 2
9+
template:
10+
metadata:
11+
labels:
12+
application: redis
13+
version: 3.2.5
14+
spec:
15+
containers:
16+
- name: redis
17+
image: redis:3.2.5
18+
volumeMounts:
19+
- mountPath: /data
20+
name: redis-data
21+
volumeClaimTemplates:
22+
- metadata:
23+
name: redis-data
24+
annotations:
25+
volume.alpha.kubernetes.io/storage-class: default
26+
spec:
27+
accessModes:
28+
- ReadWriteOnce
29+
resources:
30+
requests:
31+
storage: 7Gi

0 commit comments

Comments
 (0)