...
1apiVersion: apps/v1
2kind: Deployment
3metadata:
4 labels:
5 app: rabbitmq
6 name: rabbitmq
7spec:
8 replicas: 1
9 selector:
10 matchLabels:
11 app: rabbitmq
12 template:
13 metadata:
14 labels:
15 app: rabbitmq
16 spec:
17 containers:
18 - image: rabbitmq:3.8.12-rc.3-management
19 name: rabbitmq
20 readinessProbe:
21 exec:
22 command: ["rabbitmq-diagnostics", "ping"]
23 initialDelaySeconds: 20
24 periodSeconds: 60
25 timeoutSeconds: 10
26 ports:
27 - containerPort: 15672
28 - containerPort: 5672
29
30---
31apiVersion: v1
32kind: Service
33metadata:
34 labels:
35 app: rabbitmq
36 name: rabbitmq
37spec:
38 ports:
39 - name: http
40 port: 15672
41 protocol: TCP
42 targetPort: 15672
43 - name: amqp
44 port: 5672
45 protocol: TCP
46 targetPort: 5672
47 selector:
48 app: rabbitmq
49 type: ClusterIP
View as plain text