> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Demo Installing Kubeflow

> Step-by-step walkthrough for installing Kubeflow on Kubernetes clusters using kind or managed services, covering prerequisites, manifests, kustomize builds, apply loops, and post installation verification.

This walkthrough demonstrates installing Kubeflow onto a Kubernetes cluster. It follows a pragmatic, repeatable set of steps so you can reproduce the install locally (using kind) or on a managed cluster (EKS, AKS, GKE).

High-level steps

* Prepare a Kubernetes cluster (local or cloud).
* Install required CLI tools (kind, kustomize / kubectl).
* Download the Kubeflow manifests and make any small customizations.
* Build and apply the combined manifests to the cluster (kustomize + kubectl).
* Verify the installation and wait for key components to be Ready.

## Prerequisites

| Requirement | Purpose / Example |
| - | - |
| Kubernetes cluster | Local: `kind` (recommended for this demo). Cloud: EKS/AKS/GKE also supported. |
| kind CLI | Create local clusters: `go install sigs.k8s.io/kind@v0.31.0` or via package manager. |
| kustomize or `kubectl kustomize` | Build manifests. `kubectl` includes kustomize support: `kubectl kustomize`. |
| kubectl | Cluster access and apply resources. Ensure `kubectl` context points to your cluster. |
| Docker | For kind node images and pulling images (login for private registries). |

If you plan to pull images from private registries, ensure Docker is logged in on the machine where you run kubectl.

## Install kind and create a cluster (example)

Install kind (example):

```bash theme={null}
go install sigs.k8s.io/kind@v0.31.0
```

Create a cluster (simple example):

```bash theme={null}
time kind create cluster
```

Example output (truncated):

```text theme={null}
Creating cluster "kind" ...
  Ensuring node image (kindest/node:v1.16.3) 🖼️
  Preparing nodes 📦
  Writing configuration 📜
  Starting control-plane 🧭
  Installing CNI ⚙️
  Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind
```

### Use the Kubeflow-provided kind config

Kubeflow manifests provide an example kind config that sets kubeadm API server args required by some Kubeflow components. Save the snippet below as `kind.config.yaml` and use it when creating your cluster.

```yaml theme={null}
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  image: kindest/node:v1.34.0@sha256:7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d
kubeadmConfigPatches:
- |
  kind: ClusterConfiguration
  apiServer:
    extraArgs:
      "service-account-issuer": "https://kubernetes.default.svc"
      "service-account-signing-key-file": "/etc/kubernetes/pki/sa.key"
```

For a multi-node cluster, add additional worker nodes:

```yaml theme={null}
nodes:
- role: control-plane
  ...
- role: worker
- role: worker
```

Create the cluster using that config:

```bash theme={null}
kind create cluster --name=kubeflow --config=kind.config.yaml
```

Verify nodes are Ready:

```bash theme={null}
kubectl get nodes
```

## Kubeflow manifests repository

Choose either a stable release or the `master` branch. This demo uses the repository `master` branch to fetch the latest manifests.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/kGo6Kb0DyYSzzgOG/images/Kubeflow/Fundamentals-of-Kubeflow/Demo-Installing-Kubeflow/kubeflow-manifests-docs-dark-mode.jpg?fit=max&auto=format&n=kGo6Kb0DyYSzzgOG&q=85&s=c05d46bf9b4f14165914442b1bd43e24" alt="A screenshot of the Kubeflow documentation page titled &#x22;Kubeflow Manifests&#x22; in dark mode, showing the left navigation menu and main content about installation and recommended stable releases. The top bar displays the Kubeflow logo and site navigation." width="1920" height="1080" data-path="images/Kubeflow/Fundamentals-of-Kubeflow/Demo-Installing-Kubeflow/kubeflow-manifests-docs-dark-mode.jpg" />
</Frame>

Clone the manifests repository and change into its directory:

```bash theme={null}
git clone https://github.com/kubeflow/manifests
cd manifests
```

The repository README explains the install flow and contains example kind configs and Kustomize overlays.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/MGkgrGfKHDtoCnUb/images/Kubeflow/Fundamentals-of-Kubeflow/Demo-Installing-Kubeflow/kubeflow-manifests-readme-dark-screenshot.jpg?fit=max&auto=format&n=MGkgrGfKHDtoCnUb&q=85&s=b24584d75cf27372528602d49a0ae670" alt="A dark-themed screenshot of a GitHub README page for the Kubeflow Manifests repository, showing the &#x22;Overview of the Kubeflow Platform&#x22; section with bullet points and a small directory-purpose table. The browser window and tabs are visible across the top." width="1920" height="1080" data-path="images/Kubeflow/Fundamentals-of-Kubeflow/Demo-Installing-Kubeflow/kubeflow-manifests-readme-dark-screenshot.jpg" />
</Frame>

## Browsing the example kustomization

The `example` folder is the canonical entry point used by the official install. It pulls in many common components (cert-manager, Istio, oauth2-proxy, Dex, Knative, etc.) and application overlays.

Open `example/kustomization.yaml` to inspect top-level resources and ordering options:

```yaml theme={null}
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

sortOptions:
  order: legacy
  legacySortOptions:
    orderFirst:
      - Namespace
      - ResourceQuota
      - StorageClass
      - CustomResourceDefinition
      - MutatingWebhookConfiguration
      - ServiceAccount
      - PodSecurityPolicy
      - NetworkPolicy
```

The `example` kustomization references a `resources:` list that includes cert-manager, Istio, OAuth2-proxy overlays, Dex, and many other components. Example snippet:

```yaml theme={null}
resources:
# Cert-Manager
- ../common/cert-manager/base
- ../common/cert-manager/kubeflow-issuer/base
# Istio
- ../common/istio/istio-crds/base
- ../common/istio/istio-namespace/base
- ../common/istio/istio-install/overlays/oauth2-proxy
# OAuth2-proxy overlays (choose one depending on your cluster)
- ../common/oauth2-proxy/overlays/m2m-dex-only
# Dex
- ../common/dex/overlays/oauth2-proxy
# ...
```

You can enable or disable components by editing the `example` kustomization. For most demos and tests, leaving the defaults is fine.

## Create a default user profile (optional)

To create a Profile resource (which creates a user namespace and default resources), edit the `profile-instance` manifest under `common/user-namespace` and set a `metadata.name` and `spec.owner.name`. Example:

```yaml theme={null}
apiVersion: kubeflow.org/v1beta1
kind: Profile
metadata:
  name: kodekloud
spec:
  owner:
    kind: User
    name: sanjeev
```

Adjust these values to match the username and naming you want. When applied, Kubeflow will create the Profile and corresponding namespace.

## Prepare kubeconfig and registry credentials

If you created the cluster with kind and saved kubeconfig to a non-default path, export it:

```bash theme={null}
kind get kubeconfig --name kubeflow > /tmp/kubeflow-config
export KUBECONFIG=/tmp/kubeflow-config
```

If your cluster needs to pull images from a private registry, create a Docker registry secret (here named `regcred`) using your `~/.docker/config.json`:

```bash theme={null}
docker login    # ensure docker is logged in

kubectl create secret generic regcred \
  --from-file=.dockerconfigjson=$HOME/.docker/config.json \
  --type=kubernetes.io/dockerconfigjson
```

## Install Kubeflow using kustomize + kubectl

The recommended pattern is to build the `example` kustomization and apply it to the cluster. Because CRDs, webhooks, and controllers can come up in different orders, it’s common to retry the apply until success.

Example install loop (standalone kustomize):

```bash theme={null}
while ! kustomize build example | kubectl apply --server-side --force-conflicts -f -; do
  echo "Retrying kustomize build/apply in 10s..."
  sleep 10
done
```

If you prefer `kubectl`'s built-in kustomize:

```bash theme={null}
while ! kubectl kustomize example | kubectl apply --server-side --force-conflicts -f -; do
  echo "Retrying kubectl kustomize build/apply in 10s..."
  sleep 10
done
```

Notes

* `--server-side --force-conflicts` uses server-side apply to reduce client-side merge conflicts and improve behavior when resources already exist.
* The loop tolerates transient ordering errors during the install and retries until all resources apply successfully.

## Wait for key components

Some components take time to become Ready. Example: wait for cert-manager pods to become Ready:

```bash theme={null}
kubectl wait --for=condition=Ready pods --all -n cert-manager --timeout=180s
```

Monitor overall progress:

```bash theme={null}
kubectl get pods --all-namespaces
kubectl get deployments -A
```

You may also watch specific namespaces for pods to transition to Ready.

## Example of applied resources

When the build/apply loop finishes successfully you’ll see many server-side applied resources (CRDs, validating webhooks, and application CRs). Example (truncated):

```text theme={null}
clusterservingruntime.serving.kserve.io/kserve-torchserve serverside-applied
clusterservingruntime.serving.kserve.io/kserve-tritonserver serverside-applied
clusterservingruntime.serving.kserve.io/kserve-xgbserver serverside-applied
clusterstoragecontainer.serving.kserve.io/default serverside-applied
clustertrainingruntime.trainer.kubeflow.org/deepspeed-distributed serverside-applied
validatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook serverside-applied
validatingwebhookconfiguration.admissionregistration.k8s.io/istio-validator-istio-system serverside-applied
validatingwebhookconfiguration.admissionregistration.k8s.io/katib.kubeflow.org serverside-applied
manifests on ⮂ master [!] on ☁️ (us-east-1)
```

## Post-installation checks and next steps

* Verify that key components are Ready (Central Dashboard, Pipelines, Notebook Controller, KServe, Katib).
* Confirm the Profile namespace was created if you configured a `Profile`.
* Check logs for any failing pods and iterate on overlays or settings as needed.
* Explore the installed Kubeflow applications from the dashboard or CLI.

<Callout icon="lightbulb" color="#1CB2FE">
  Customize the `example` kustomization to enable or disable components (Istio overlays, OAuth2-proxy options, KServe, Katib, etc.) depending on your environment. For cloud-specific clusters (GKE, EKS), pick the recommended overlays in the manifests repository.
</Callout>

This completes the installation walkthrough. Explore the manifests, overlays, and installed resources to understand how the Kubeflow platform composes and deploys on your cluster. For more details and troubleshooting, refer to the Kubeflow Manifests repository and the Kubeflow docs.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/kubeflow/module/24395bd8-eef8-4e7a-aa70-510287e3a88d/lesson/04806b5b-1e3a-481b-8495-7400733f91dd" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.