Last active
December 3, 2025 03:14
-
-
Save felipemontoya/509495d3fbaa696fa2b684880a8388da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This plugin installs a local running ollama container | |
| name: ollama-service | |
| version: 0.1.0 | |
| patches: | |
| k8s-services: | | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: ollama | |
| labels: | |
| app.kubernetes.io/name: ollama | |
| app.kubernetes.io/part-of: openedx | |
| spec: | |
| selector: | |
| app.kubernetes.io/name: ollama | |
| ports: | |
| - name: http | |
| port: 11434 | |
| targetPort: 11434 | |
| k8s-deployments: | | |
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: ollama | |
| labels: | |
| app.kubernetes.io/name: ollama | |
| app.kubernetes.io/part-of: openedx | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app.kubernetes.io/name: ollama | |
| template: | |
| metadata: | |
| labels: | |
| app.kubernetes.io/name: ollama | |
| app.kubernetes.io/part-of: openedx | |
| spec: | |
| containers: | |
| - name: ollama | |
| image: ollama/ollama:latest | |
| ports: | |
| - containerPort: 11434 | |
| env: | |
| - name: OLLAMA_HOST | |
| value: 0.0.0.0:11434 | |
| volumeMounts: | |
| - name: ollama-data | |
| mountPath: /root/.ollama | |
| command: ["/bin/sh", "-c"] | |
| args: | |
| - | | |
| ollama serve & | |
| until ollama list 2>/dev/null; do | |
| sleep 1 | |
| done | |
| ollama pull llama3.2:1b | |
| ollama pull phi3:mini | |
| ollama pull qwen2.5:1.5b | |
| wait | |
| volumes: | |
| - name: ollama-data | |
| persistentVolumeClaim: | |
| claimName: ollama-data | |
| --- | |
| apiVersion: v1 | |
| kind: PersistentVolumeClaim | |
| metadata: | |
| name: ollama-data | |
| labels: | |
| app.kubernetes.io/name: ollama | |
| app.kubernetes.io/part-of: openedx | |
| spec: | |
| accessModes: | |
| - ReadWriteOnce | |
| resources: | |
| requests: | |
| storage: 20Gi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment