- vLLM image mirrored to registry.celestium.life/stonks-oracle/vllm-openai - Deployment uses Harbor image (Docker Hub IPv6 unreachable from cluster) - All 3 pipelines use vllm-external.vllm-service.svc.cluster.local:2701 - K8s manifests at infra/kube-vllm/ and synced to ~/sources/kube/vllm
75 lines
1.6 KiB
YAML
75 lines
1.6 KiB
YAML
# vLLM metrics proxy — similar to ollama-metrics
|
|
# Proxies requests and exposes Prometheus metrics
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: vllm-metrics
|
|
namespace: vllm-service
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: vllm-metrics
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: vllm-metrics
|
|
spec:
|
|
containers:
|
|
- name: proxy
|
|
image: nginx:alpine
|
|
ports:
|
|
- containerPort: 8080
|
|
volumeMounts:
|
|
- name: nginx-conf
|
|
mountPath: /etc/nginx/conf.d/default.conf
|
|
subPath: default.conf
|
|
volumes:
|
|
- name: nginx-conf
|
|
configMap:
|
|
name: vllm-proxy-config
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: vllm-proxy-config
|
|
namespace: vllm-service
|
|
data:
|
|
default.conf: |
|
|
upstream vllm_backend {
|
|
server vllm.vllm-service.svc.cluster.local:8000;
|
|
}
|
|
|
|
server {
|
|
listen 8080;
|
|
|
|
# API proxy
|
|
location / {
|
|
proxy_pass http://vllm_backend;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_connect_timeout 300s;
|
|
proxy_read_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
}
|
|
|
|
# vLLM exposes /metrics natively
|
|
location /metrics {
|
|
proxy_pass http://vllm_backend/metrics;
|
|
}
|
|
}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: vllm-metrics
|
|
namespace: vllm-service
|
|
spec:
|
|
ports:
|
|
- name: proxy
|
|
port: 8080
|
|
targetPort: 8080
|
|
selector:
|
|
app: vllm-metrics
|
|
type: ClusterIP
|