-
Notifications
You must be signed in to change notification settings - Fork 0
/
tcp-server-ss.yaml
49 lines (48 loc) · 1.05 KB
/
tcp-server-ss.yaml
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
40
41
42
43
44
45
46
47
48
49
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: tcp-server
namespace: default
spec:
selector:
matchLabels:
app: tcp-server # has to match .spec.template.metadata.labels
serviceName: none
replicas: 1
minReadySeconds: 10 # by default is 0
template:
metadata:
labels:
app: tcp-server # has to match .spec.selector.matchLabels
prometheus: "true"
spec:
terminationGracePeriodSeconds: 10
volumes:
- name: tcp-server-cfg
configMap:
name: tcp-server-cfg
containers:
- name: tcp-server
image: fir.love.io:3005/tcp-server:latest
ports:
- name: tcp-server
containerPort: 5001
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: tcp-server-0-service
namespace: default
labels:
statefulset.kubernetes.io/pod-name: tcp-server-0
spec:
type: ClusterIP
ports:
- name: ingress
protocol: TCP
port: 5001
targetPort: 5001
selector:
statefulset.kubernetes.io/pod-name: tcp-server-0