Running thehive4 as a cluster on Kubernetes

Viewed 428

I'm trying to create a cluster of the thehive4 on K8s. From the Documentation here, the deployment is done on servers which is different. There is non official helm chart here, but it is not what I'm looking for.

I created this deployment manifest and successfully created thehive nodes on Kuberenetes, but they are still not acting as a cluster since the application.conf file is not setup correctly.

Has anyone tried this before or has a similar experience with it, please share any documentation or usefull support to finish the setup.

Thank you in advance.

apiVersion: v1
kind: ConfigMap
metadata:
  name: thehive-config
data:
  application.conf: |
    
    # configuration example using servers not k8s

    akka {
      cluster.enable = on 
      actor {
        provider = cluster
      }
    remote.artery {
      canonical {
        hostname = "<My IP address>"
        port = 2551
      }
    }
    # seed node list contains at least one active node
    cluster.seed-nodes = [
                          "akka://[email protected]<Node 1 IP address>:2551",
                          "akka://[email protected]<Node 2 IP address>:2551",
                          "akka://[email protected]<Node 3 IP address>:2551"
                        ]
    }
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  creationTimestamp: null
  labels:
    io.kompose.service: thehive-claim1
  name: thehive-claim1
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1G
status: {}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  creationTimestamp: null
  labels:
    io.kompose.service: thehive-claim2
  name: thehive-claim2
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1G
status: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.22.0 (955b78124)
  creationTimestamp: null
  labels:
    io.kompose.service: thehive
  name: thehive
spec:
  replicas: 3
  selector:
    matchLabels:
      io.kompose.service: thehive
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        kompose.cmd: kompose convert
        kompose.version: 1.22.0 (955b78124)
      creationTimestamp: null
      labels:
        io.kompose.service: thehive
    spec:
      containers:
        - args:
            - --no-config
            - --no-config-secret
          image: thehiveproject/thehive4:latest
          name: thehive4
          ports:
            - containerPort: 9000
          resources: {}
          volumeMounts:
            - mountPath: /etc/thehive/application.conf
              subPath: application.conf
              name: config-volume
            - mountPath: /opt/thp/thehive/data
              name: thehive-claim1
            - mountPath: /opt/thp/thehive/index
              name: thehive-claim2
      restartPolicy: Always
      volumes:
        - name: config-volume
          configMap:
            name: thehive-config
        - name: thehive-claim1
          persistentVolumeClaim:
            claimName: thehive-claim1
        - name: thehive-claim2
          persistentVolumeClaim:
            claimName: thehive-claim2
status: {}
0 Answers
Related