From 84da3a39169e4ad00f5a3b4e00b1831b29f9a99e Mon Sep 17 00:00:00 2001
From: Peter Pan <Peter.Pan@daocloud.io>
Date: Fri, 10 May 2024 16:03:34 +0800
Subject: [PATCH] add ollama-operator in example

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
---
 examples/kubernetes-operator/README.md | 28 ++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 examples/kubernetes-operator/README.md

diff --git a/examples/kubernetes-operator/README.md b/examples/kubernetes-operator/README.md
new file mode 100644
index 00000000..562fd8d2
--- /dev/null
+++ b/examples/kubernetes-operator/README.md
@@ -0,0 +1,28 @@
+# Deploy Ollama to Kubernetes Operator
+
+
+### Prerequisites
+
+- Install [Ollama-operator](https://github.com/nekomeowww/ollama-operator)
+
+### Steps
+
+1. create a `Model` CR, serving model `phi` as an example:
+
+   ```
+   kubectl apply -f - << EOF
+   apiVersion: ollama.ayaka.io/v1
+   kind: Model
+   metadata:
+     name: phi
+   spec:
+     image: phi
+   EOF
+   ```
+
+2. forward the ports to access the model outside cluster:
+   ```
+   kubectl port-forward svc/ollama-model-phi ollama
+   ```
+
+3. Install [ollama cli](https://github.com/ollama/ollama) and interact with the model with either API or ollama CLI( e.g. `ollama run phi` ).