Unifi-controller mongodb fails to setup socket

Hi,

I’m trying to get the unifi-controller running on k8s. It works when I don’t use persistent volumes, when I use a hostPath volume mongodb fails to bind a socket. PGID/PUID 1000 is the id of the docker user in minikube, it has root and write access to the host/unificonfig folder.

Anyone have any idea on whats going on?

SETUP:
Ubuntu 19.10
minikube

k8s-deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: unifi-controller
  labels:
    app: unifi-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: unifi
  template:
    metadata:
      labels:
        app: unifi    
    spec:
      containers:
      - name: unifi-controller
        image: linuxserver/unifi-controller
        volumeMounts:
        - mountPath: /config
          name: unifi-storage
        env:
          - name: PGID
            value: "1000"
          - name: PUID
            value: "1000"
      volumes:
      - name: unifi-storage
        hostPath:
          type: Directory
          path: /host/unificonfig

mongod.log

2019-11-14T20:00:32.703+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2019-11-14T20:00:32.704+0000 I CONTROL [initandlisten] allocator: tcmalloc
2019-11-14T20:00:32.704+0000 I CONTROL [initandlisten] modules: none
2019-11-14T20:00:32.705+0000 I CONTROL [initandlisten] build environment:
2019-11-14T20:00:32.705+0000 I CONTROL [initandlisten] distmod: ubuntu1604
2019-11-14T20:00:32.705+0000 I CONTROL [initandlisten] distarch: x86_64
2019-11-14T20:00:32.706+0000 I CONTROL [initandlisten] target_arch: x86_64
2019-11-14T20:00:32.706+0000 I CONTROL [initandlisten] options: { net: { bindIp: “127.0.0.1”, port: 27117, unixDomainSocket: { pathPrefix: “/usr/lb/unifi/run” } }, storage: { dbPath: “/usr/lib/unifi/data/db” }, systemLog: { destination: “file”, logAppend: true, path: “/usr/lib/unifi/logs/mongod.log” } }
2019-11-14T20:00:32.723+0000 E NETWORK [initandlisten] listen(): bind() failed Operation not permitted for socket: /usr/lib/unifi/run/mongodb-27117.sock
2019-11-14T20:00:32.723+0000 E NETWORK [initandlisten] Failed to set up sockets during startup.
2019-11-14T20:00:32.724+0000 E STORAGE [initandlisten] Failed to set up listener: InternalError: Failed to set up sockets
2019-11-14T20:00:32.724+0000 I NETWORK [initandlisten] shutdown: going to close listening sockets…
2019-11-14T20:00:32.724+0000 I NETWORK [initandlisten] shutdown: going to flush diaglog…
2019-11-14T20:00:32.725+0000 I CONTROL [initandlisten] now exiting
2019-11-14T20:00:32.725+0000 I CONTROL [initandlisten] shutting down with code:48