kubernetes cluster - working version

This commit is contained in:
2022-06-20 23:24:17 +02:00
parent 86cd07c4b6
commit fb2895f79d
14 changed files with 99 additions and 20 deletions

View File

@@ -1,9 +1,8 @@
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: rabbitmq
spec:
serviceName: rabbitmq
selector:
matchLabels:
app: rabbitmq
@@ -15,15 +14,10 @@ spec:
spec:
containers:
- name: rabbitmq
image: rabbitmq:management
image: registry.willemserruys.com/rabbitmq
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 5672
- containerPort: 1883
- containerPort: 15672
volumeMounts:
- name: rabbitmq-data
mountPath: /rabbitmq/data
volumes:
- name: rabbitmq-data
persistentVolumeClaim:
claimName: rabbitmq-pvc
imagePullSecrets:
- name: regcred

View File

@@ -1,12 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rabbitmq-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: microk8s-hostpath
resources:
requests:
storage: 1Gi

View File

@@ -5,15 +5,15 @@ metadata:
spec:
type: NodePort
ports:
- port: 5672
name: messagebus
targetPort: 5672
nodePort: 30001
- port: 1883
name: mqtt
targetPort: 1883
nodePort: {{ .Values.rabbitmq.mqtt_nodePort }}
protocol: TCP
- port: 15672
name: portal
targetPort: 15672
nodePort: 30002
nodePort: {{ .Values.rabbitmq.portal_nodePort }}
protocol: TCP
selector:
app: rabbitmq