---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redisspring-demo
spec:
selector:
matchLabels:
app: redisspring-demo
replicas: 3
replicastemplate: 1
templatemetadata:
metadatalabels:
labelsapp: spring-demo
spec:
appcontainers:
redis
- specname: spring-demo
containers:image: sooabia/spring-demo:1.0
- nameports:
redis
- containerPort: image: redis8080
---
kind: Service
apiVersion: v1
metadata:
name: spring-service
spec:
selector:
app: spring-demo
ports:
- protocol: TCP
port: 80
targetPort: 8080
- containerPorttype: 6379LoadBalancer
---
apiVersion: apps/v1
kind: DeploymentStatefulSet
metadata:
name: webflux-demoredis
spec:
selector:
matchLabels:
app: redis
serviceName: webflux-demoredis
replicas: 31
template:
metadata:
labels:
app: webflux-demoredis
spec:
containers:
- name: reactor-demoredis
image: sooabia/webflux-demo:1.0redis
ports:
- containerPort: 8080
---
kind: Service
apiVersion: v1
metadata:
6379
volumeMounts:
- name: data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: spring-service
data
spec:
selector:
accessModes: [ "ReadWriteOnce" ]
app: webflux-demo
portsresources:
- protocol: TCP
portrequests:
80
targetPort: 8080
typestorage: LoadBalancer1Gi
---
kind: Service
apiVersion: v1
metadata:
name: redis
spec:
selector:
app: redis
ports:
- protocol: TCP
port: 6379
targetPort: 6379
type: ClusterIP |