1. deployment 및 service yaml 작성
- deployment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: redis-test
spec:
replicas: 1
template:
metadata:
labels:
app: redis
spec:
containers:
- name: master
image: redis
resources:
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 6379
- service
1
2
3
4
5
6
7
8
9
10apiVersion: v1
kind: Service
metadata:
name: redis-test
spec:
selector:
app: redis
ports:
- protocol: TCP
port: 6379