forked from UTSCC09/project-horizon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
redis.yml
39 lines (38 loc) · 767 Bytes
/
redis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Source: https://github.com/kubernetes/examples/blob/master/guestbook/redis-master-deployment.yaml
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: redis-master
spec:
selector:
matchLabels:
app: redis
role: master
tier: backend
replicas: 1
template:
metadata:
labels:
app: redis
role: master
tier: backend
spec:
containers:
- name: master
image: redis
ports:
- containerPort: 6379
---
apiVersion: v1
kind: Service
metadata:
name: redis-leader
labels:
app: redis
spec:
type: NodePort
selector:
app: redis
ports:
- name: redis-leader
port: 6379