forked from evildecay/etcdkeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
70 lines (70 loc) · 1.5 KB
/
deployment.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: etcdkeeper
labels:
app: etcdkeeper
spec:
replicas: 1
selector:
matchLabels:
app: etcdkeeper
template:
metadata:
labels:
app: etcdkeeper
spec:
containers:
- name: etcdkeeper
image: runzhliu/k8s-etcdkeeper:latest
imagePullPolicy: Always
command:
- ./etcdkeeper
args:
- -k8sMode
- -usetls
- -cacert
- /app/conf/kube-ca.pem
- -cert
- /app/conf/peer.crt
- -key
- /app/conf/peer.key
ports:
- containerPort: 8080
volumeMounts:
- name: etcdkeeper-config
mountPath: /app/conf
volumes:
- name: etcdkeeper-config
configMap:
name: etcdkeeper-config
---
apiVersion: v1
kind: Service
metadata:
name: etcdkeeper-service
spec:
type: NodePort
ports:
- port: 8080 # the port that this service should serve on
# the container on each pod to connect to, can be a name
# (e.g. 'www') or a number (e.g. 80)
targetPort: 8080
protocol: TCP
nodePort: 30023
# just like the selector in the deployment,
# but this time it identifies the set of pods to load balance
# traffic to.
selector:
app: etcdkeeper
---
# 填充你的证书信息
apiVersion: v1
data:
kube-ca.pem: |-
peer.crt: |-
peer.key: |-
kind: ConfigMap
metadata:
name: etcdkeeper-config