Skip to content

Instantly share code, notes, and snippets.

@suhovius
Created July 30, 2024 19:11
Show Gist options
  • Select an option

  • Save suhovius/904e35df171bc71d194697cd223df79a to your computer and use it in GitHub Desktop.

Select an option

Save suhovius/904e35df171bc71d194697cd223df79a to your computer and use it in GitHub Desktop.
llama3.1 + Kubernetes
❯ ollama run llama3.1
>>> create app-volume pod with container image 'gcr.io/kuar-demo/kuard-amd64:1' named 'app' and open container port 8080 with name 'http' with livenessProbe http get at port 8080 with settin
... gs: initial delay seconds 5, timeout seconds 1, period seconds 10, failure threshold 3 and readinessProbe at path /ready port 8080 with settings: period seconds 2, initial delay seconds
... 0, failure threshold 3, success threshold 1. Add volume mount named 'data' at host path /var/lib/app to mounted at /data
Here is the YAML configuration for a Kubernetes Pod that meets your requirements:
```
apiVersion: v1
kind: Pod
metadata:
name: app-volume
spec:
containers:
- name: app
image: gcr.io/kuar-demo/kuard-amd64:1
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
hostPath:
path: /var/lib/app
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 5
timeoutSeconds: 1
periodSeconds: 10
failureThreshold: 3
readinessProbe:
httpGet:
path: /ready
port: 8080
periodSeconds: 2
initialDelaySeconds: 0
failureThreshold: 3
successThreshold: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment