Deploy Ollama to Kubernetes Operator
Prerequisites
- Install Ollama-operator
Steps
-
create a
Model
CR, serving modelphi
as an example:kubectl apply -f - << EOF apiVersion: ollama.ayaka.io/v1 kind: Model metadata: name: phi spec: image: phi EOF
-
forward the ports to access the model outside cluster:
kubectl port-forward svc/ollama-model-phi ollama
-
Install ollama cli and interact with the model with either API or ollama CLI( e.g.
ollama run phi
).