| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: activemq-cluster |
| namespace: default |
| spec: |
| selector: |
| app: activemq |
| ports: |
| - name: external-port |
| port: 8161 |
| targetPort: 8161 |
| - name: internal-port |
| port: 61616 |
| protocol: TCP |
| targetPort: 61616 |
| type: LoadBalancer |
| |
| --- |
| |
| apiVersion: extensions/v1beta1 |
| kind: Deployment |
| metadata: |
| name: activemq-cluster |
| namespace: default |
| spec: |
| replicas: 1 |
| selector: |
| matchLabels: |
| app: activemq |
| strategy: |
| rollingUpdate: |
| maxSurge: 25% |
| maxUnavailable: 25% |
| type: RollingUpdate |
| template: |
| metadata: |
| labels: |
| app: activemq |
| spec: |
| containers: |
| - image: docker.io/rmohr/activemq:5.14.5 |
| imagePullPolicy: IfNotPresent |
| name: activemq |
| ports: |
| - containerPort: 61616 |
| - containerPort: 8161 |
| env: |
| - name: ACTIVEMQ_CONFIG_MINMEMORY |
| value: "512" |
| - name: ACTIVEMQ_CONFIG_MAXMEMORY |
| value: "1024" |
| livenessProbe: |
| httpGet: |
| path: / |
| port: 8161 |
| initialDelaySeconds: 45 |
| timeoutSeconds: 10 |
| periodSeconds: 60 |
| failureThreshold: 3 |
| |