Install Kubeflow locally

For local installation of Kubeflow you can use Vagrant box, Minikube or install it using Multipass. Here I will describe the multipass installation. The best link for the installation process is here.
This installation uses Microk8s orchestrator and has some caveats.
First of all you have to create volumes manually, other way you services won't work correctly.

Before all I would suggest to install version 1.13 of microk8s, because 1.14 is not compatible now with kubflow.

 sudo snap install microk8s --channel=1.13

For this purpose please edit kubernetes-tools/setup-microk8s.sh line 10:
CHANNEL=${CHANNEL:-1.13/stable}
1.14 where changed on 1.13.
Then run sudo kubernetes-tools/setup-microk8s.sh

Step 1: Create storage class. I used next data:


apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: local
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer

Just save and apply this data.

kubectl apply -f you_file_name.yaml

Step 2: You have to create persistent  volumes for the next services: minio, mysql, katib.
I would suggest the next yaml:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: e-volume
  labels:
    type: local
spec:
  storageClassName: local
  capacity:
    storage: 4Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data"

* please create /mnt/data beforehand
You can change name of the volume. Quantity of created volumes should equal quantity of services, in our case 3.

Step 3 (Optional): Create persistent volume claims for our services:
Mysql

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: mysql-pv-claim
spec:
  storageClassName: local
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi

Katib

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: katib-mysql
spec:
  storageClassName: local
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi

Minio

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: minio-pvc
spec:
  storageClassName: local
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi

Dont't forget about this patch:

sudo ln -s /var/snap/microk8s/common/var/lib/docker /var/lib/docker
sudo ln -s /var/snap/microk8s/current/docker.sock /var/run/docker.sock
Explanation can be found here.

Comments

Popular posts from this blog

RabbitMQ and OpenShift