Skip to content

Instantly share code, notes, and snippets.

@vicenteherrera
Last active February 22, 2024 15:05
Show Gist options
  • Save vicenteherrera/481cdfff3027406079a1d8ad80b68d2a to your computer and use it in GitHub Desktop.
Save vicenteherrera/481cdfff3027406079a1d8ad80b68d2a to your computer and use it in GitHub Desktop.
Deploy Kubeflow locally

Deploy Kubeflow on Minikube

References:

# Start Minikube
# At least you need CPUS=8 MEMORY=16g DISK=40000mb (for example using a laptop)
# These are my settings using a desktop with 64Gb of ram
minikube start \
  --kubernetes-version="v1.28.0-rc.1" \
  --memory="20g" \
  --cpus="8" \
  --disk-size="60000mb" \
  --bootstrapper=kubeadm \
  --extra-config=kubelet.authentication-token-webhook=true \
  --extra-config=kubelet.authorization-mode=Webhook \
  --extra-config=scheduler.bind-address=0.0.0.0 \
  --extra-config=controller-manager.bind-address=0.0.0.0 \
  --extra-config=kubelet.housekeeping-interval=10s


# Clone Kubeflow manifest repo
git clone https://github.com/kubeflow/manifests.git kubeflow-manifests
cd kubeflow-manifests


# Deploy Kubeflow manifests
while ! kustomize build example | kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done


# Wait for all pods to be running
kubectl get pods -A


# If you see containers with this error:
#   "too many open files"
# You may need to increase the number of files a process can open on the host system

sudo sysctl fs.inotify.max_user_instances=1280
sudo sysctl fs.inotify.max_user_watches=655360

# see:
# * https://www.deploykf.org/guides/troubleshooting/
# * https://github.com/kubeflow/manifests/issues/2087
# You can do it while Minikube is running, and wait for pods to restart successfully


# When all pods are running, log in

kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80

# Open: http://localhost:8080
# Username is user@example.com and the password is 12341234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment