Installation and Setup
This guide covers different methods to install and set up Kubeflow in your environment.
Prerequisites
Before installing Kubeflow, ensure you have:
- Kubernetes cluster (version 1.25 or later)
- kubectl configured to communicate with your cluster
- Minimum resources: 4 CPU cores, 8 GB RAM, 50 GB disk space
- Storage class for persistent volumes
Installation Methods
Option 1: Kubeflow on Minikube (Local Development)
For local development and testing:
# Start Minikube with sufficient resources
minikube start --cpus=4 --memory=8192 --disk-size=50g
# Install Kubeflow using kustomize
export KUBEFLOW_VERSION=1.8.0
export KUBEFLOW_URL="https://github.com/kubeflow/manifests/archive/v${KUBEFLOW_VERSION}.tar.gz"
# Download and extract manifests
wget -O kubeflow.tar.gz ${KUBEFLOW_URL}
tar -xvf kubeflow.tar.gz
cd manifests-${KUBEFLOW_VERSION}
# Install all Kubeflow components
while ! kustomize build example | kubectl apply -f -; do
echo "Retrying to apply resources"
sleep 10
done
# Wait for all pods to be ready
kubectl wait --for=condition=Ready pods --all -n kubeflow --timeout=600s
Option 2: Kubeflow on Cloud Platforms
Google Cloud Platform (GKE):
# Create GKE cluster
gcloud container clusters create kubeflow-cluster \
--zone=us-central1-a \
--machine-type=n1-standard-4 \
--num-nodes=3 \
--enable-autoscaling \
--min-nodes=3 \
--max-nodes=10
# Get credentials
gcloud container clusters get-credentials kubeflow-cluster --zone=us-central1-a
# Install Kubeflow
export PIPELINE_VERSION=1.8.0
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/cluster-scoped-resources?ref=$PIPELINE_VERSION"
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/env/platform-agnostic-pns?ref=$PIPELINE_VERSION"
AWS (EKS):
# Create EKS cluster
eksctl create cluster \
--name kubeflow-cluster \
--version 1.28 \
--region us-west-2 \
--nodegroup-name standard-workers \
--node-type m5.xlarge \
--nodes 3 \
--nodes-min 3 \
--nodes-max 10 \
--managed
# Install Kubeflow
export KUBEFLOW_VERSION=1.8.0
kubectl apply -k "github.com/kubeflow/manifests/example?ref=v${KUBEFLOW_VERSION}"
Option 3: Using Kubeflow Operator
The simplest installation method using the Kubeflow operator:
# Install the operator
kubectl apply -f https://raw.githubusercontent.com/kubeflow/kubeflow/master/bootstrap/kubeflow-operator.yaml
# Create Kubeflow instance
cat <<EOF | kubectl apply -f -
apiVersion: kubeflow.org/v1
kind: Kubeflow
metadata:
name: kubeflow
namespace: kubeflow
spec:
version: v1.8.0
components:
- notebooks
- pipelines
- kfserving
- katib
- training
EOF
Accessing Kubeflow Dashboard
After installation, access the Kubeflow dashboard:
# Port forward to access the dashboard
kubectl port-forward -n istio-system svc/istio-ingressgateway 8080:80
# Access at http://localhost:8080
For production, configure an Ingress or LoadBalancer service.
Next Steps
With Kubeflow installed, you can now:
- Build ML Pipelines - Create your first ML pipeline
- Deploy Models - Learn about model deployment and serving
- Monitor Workloads - Set up monitoring and observability