ollama/examples/kubernetes-operator
Peter Pan 84da3a3916 add ollama-operator in example
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
2024-05-10 16:06:17 +08:00
..
2024-05-10 16:06:17 +08:00

Deploy Ollama to Kubernetes Operator

Prerequisites

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 and interact with the model with either API or ollama CLI( e.g. ollama run phi ).