WeBWorK on K8s
- Clone repo on host
$ cd
$ git clone https://github.com/hmmohammadi/webwork-k8s.git
$ cd webwork-k8s- Create required directories for PersistentVolume(pv) or change as you want. :D
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: ww-mariadb-pv
  namespace: webwork2
spec:
  accessModes: [ "ReadWriteOnce" ]
  capacity:
    storage: "3Gi"
  hostPath:
    path: /mnt/db   ## <----------------- HERE
------
apiVersion: v1
kind: PersistentVolume
metadata:
  name: ww-pv-course
  namespace: webwork2
spec:
  accessModes: [ "ReadWriteOnce" ]
  capacity:
    storage: "3Gi"
  hostPath:
    path: /mnt/courses  ## <----------------- HERE
------
apiVersion: v1
kind: PersistentVolume
metadata:
  name: ww-pv-htdocs
  namespace: webwork2
spec:
  accessModes: [ "ReadWriteOnce" ]
  capacity:
    storage: "3Gi"
  hostPath:
    path: /mnt/htdocs ## <----------------- HERE
---- Create namespace on k8s cluster
 $ kubectl create -f webWork2.yml- Deploy mariadb
 $ kubectl create -f mariadb-ww2-deploy.yml- Deploy ww2
 $ kubectl create -f ww2-deploy.yaml