Wekan Example

Wekan is open-source kanban board, alternative to trello.

How to run

  • Save this example to file, e.g wekan.yaml
  • Change host names myapp.kuber.host to domain of your namespace (see your domains)
  • Run with kubectl apply -f wekan.yaml

Example Screenshot

wekan.yaml

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: wekan-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 300Mi

---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: mongodb-storage
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 300Mi

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: mongodb
  labels:
    app: mongodb
spec:
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: mongodb
    spec:
      containers:
        - name: mongodb
          image: mongo:latest
          env:
            - name: MONGO_INITDB_ROOT_USERNAME
              value: root
            - name: MONGO_INITDB_ROOT_PASSWORD
              value: ""
            - name: MONGO_INITDB_DATABASE
              value: wekan
          command: ["mongod", "--smallfiles", "--nojournal", "--bind_ip_all"]
          resources:
            limits: { memory: "100Mi", cpu: "100m" }
          ports:
            - containerPort: 27017
          volumeMounts:
            - name: mongodb-storage
              mountPath: /data/db
          readinessProbe:
            exec:
              command:
              - mongo
              - --eval
              - "db.adminCommand('ping')"
            timeoutSeconds: 5
      volumes:
      - name: mongodb-storage
        persistentVolumeClaim:
          claimName: mongodb-storage

---
apiVersion: v1
kind: Service
metadata:
  name: mongodb
spec:
  type: LoadBalancer
  selector:
    app: mongodb
  ports:
    - port: 27017

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: wekan
  labels:
    app: wekan
spec:
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: wekan
    spec:
      securityContext:
        fsGroup: 0
        runAsUser: 0
      containers:
        - name: wekan
          image: quay.io/wekan/wekan:latest
          #command: ["sh", "-c"]
          #args: ["sleep 1000"]
          env:
            - name: MONGO_URL
              value: mongodb://root@mongodb:27017/wekan
            - name: ROOT_URL
              value: https://paxa.kuber.host
            - name: PORT
              value: "3000"
          resources:
            requests: { memory: "400Mi", cpu: "200m" }
            limits: { memory: "400Mi", cpu: "200m" }
          ports:
            - containerPort: 3000
#          command: ["sh", "-c"]
#          args: ["sleep 10000"]
          volumeMounts:
          - name: wekan-pvc
            mountPath: /app/uploads
          readinessProbe:
            httpGet:
              path: /
              port: 3000
            initialDelaySeconds: 10
            timeoutSeconds: 5
            periodSeconds: 15
      volumes:
      - name: wekan-pvc
        persistentVolumeClaim:
          claimName: wekan-pvc

---
apiVersion: v1
kind: Service
metadata:
  name: wekan
spec:
  ports:
    - port: 3000
  selector:
    app: wekan

---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: wordpress-ingress
  annotations:
    kubernetes.io/ingress.class: "nginx"
    certmanager.k8s.io/cluster-issuer: letsencrypt
spec:
  tls:
    - hosts:
      - paxa.kuber.host
      secretName: paxa-kuber-host
  rules:
  - host: paxa.kuber.host
    http:
      paths:
      - path: /
        backend:
          serviceName: wekan
          servicePort: 3000