devforth/OnLogs

[Feature Request] kubernetes support

Closed this issue · 3 comments

Any plan to add kubernetes support? Specially for containerd backend.

It should be supported from the box, but will check and get back to you with an example of usage

in containerd backend (k3s cluster), I'm not understanding where to find .sock file

Simply for kubernetes with containerd backend for docker, this one worked for me:

apiVersion: v1
kind: Pod
metadata:
  name: privileged-pod
spec:
  containers:
  - name: onlogs
    image: devforth/onlogs:latest
    env:
      - name: ADMIN_USERNAME
        value: admin
      - name: ADMIN_PASSWORD
        value: admin
      - name: PORT
        value: "9876"
    volumeMounts:
      - name: onlogs-volume
        mountPath: /leveldb
      - name: docker-socket
        mountPath: /var/run/docker.sock
      - name: hostname
        mountPath: /etc/hostname
    ports:
      - containerPort: 9876

    securityContext:
      privileged: true # privilegies configuring
  securityContext:
    runAsUser: 0 # run as user with ID 0 (root)
  volumes:
    - name: onlogs-volume
      hostPath:
        path: /leveldb
        type: DirectoryOrCreate
    - name: docker-socket
      hostPath:
        path: /var/run/docker.sock
        type: Socket
    - name: hostname
      hostPath:
        path: /etc/hostname
        type: FileOrCreate