43 lines
670 B
YAML
43 lines
670 B
YAML
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: redis
|
||
|
namespace: storage
|
||
|
spec:
|
||
|
type: ClusterIP
|
||
|
clusterIP: None
|
||
|
selector:
|
||
|
app: redis
|
||
|
ports:
|
||
|
- name: redis
|
||
|
port: 6379
|
||
|
protocol: TCP
|
||
|
|
||
|
---
|
||
|
|
||
|
apiVersion: apps/v1
|
||
|
kind: StatefulSet
|
||
|
metadata:
|
||
|
name: redis
|
||
|
namespace: storage
|
||
|
labels:
|
||
|
app: redis
|
||
|
annotations:
|
||
|
reloader.stakater.com/auto: "true"
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: redis
|
||
|
replicas: 1
|
||
|
serviceName: redis
|
||
|
updateStrategy:
|
||
|
type: RollingUpdate
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: redis
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: redis
|
||
|
image: redis:latest
|
||
|
imagePullPolicy: IfNotPresent
|