Files
k3s-cluster/litellm/litellm.yaml
2026-01-24 15:59:09 +01:00

73 lines
1.6 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: litellm-config-file
data:
config.yaml: |
model_list:
- model_name: gpt-4.1-mini
litellm_params:
model: openai/gpt-4.1-mini
api_key: "os.environ/OPENAI_API_KEY"
- model_name: qwen3:32b
litellm_params:
model: ollama/qwen3:32b
api_base: "http://10.88.88.236:11434"
- model_name: gemma3:27b
litellm_params:
model: ollama/gemma3:27b
api_base: "http://10.88.88.236:11434"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: litellm-deployment
labels:
app: litellm
spec:
selector:
matchLabels:
app: litellm
template:
metadata:
labels:
app: litellm
spec:
containers:
- name: litellm
image: ghcr.io/berriai/litellm:main-latest # it is recommended to fix a version generally
args:
- "--config"
- "/app/proxy_server_config.yaml"
ports:
- containerPort: 4000
volumeMounts:
- name: config-volume
mountPath: /app/proxy_server_config.yaml
subPath: config.yaml
envFrom:
- secretRef:
name: litellm-secrets
env:
- name: STORE_MODEL_IN_DB
value: "True"
volumes:
- name: config-volume
configMap:
name: litellm-config-file
---
apiVersion: v1
kind: Service
metadata:
name: litellm-service
namespace: default
spec:
type: ClusterIP
selector:
app: litellm
ports:
- name: http
port: 80
targetPort: 4000