apiVersion: apps/v1 kind: Deployment metadata: name: ollama namespace: ollama labels: app: ollama spec: replicas: 0 strategy: type: Recreate selector: matchLabels: app: ollama template: metadata: labels: app: ollama spec: containers: - name: ollama image: ollama/ollama:latest ports: - containerPort: 11434 env: - name: NVIDIA_VISIBLE_DEVICES value: all volumeMounts: - name: models mountPath: /root/.ollama resources: requests: memory: 2Gi cpu: 500m limits: memory: 8Gi cpu: "4" volumes: - name: models persistentVolumeClaim: claimName: ollama-models --- apiVersion: v1 kind: Service metadata: name: ollama namespace: ollama spec: selector: app: ollama ports: - port: 11434 targetPort: 11434 nodePort: 31434 type: NodePort