[Share] Configuration Kubernetes (k8s) for one-api #4114
Replies: 6 comments
-
Another NoteNote For |
Beta Was this translation helpful? Give feedback.
-
Show off it's so cheap and stable(base) root@H0llyW00dzZ:/# kubectl top pods
NAME CPU(cores) MEMORY(bytes)
mysql-ochjeq9dpo-1k14 5m 403Mi
one-api-0tb4urx12y-0fzj2 0m 44Mi |
Beta Was this translation helpful? Give feedback.
-
Another show off still can handle 15 million tokens without stupid memory leaks that I don't fucking understand |
Beta Was this translation helpful? Give feedback.
-
bump docs updated |
Beta Was this translation helpful? Give feedback.
-
bump zero downtime $ kubectl get pods
NAME READY STATUS RESTARTS AGE
mysql-krq66e7q1m-6h9qd 1/1 Running 0 3d15h
one-api-p2caldes54-7xzgn 1/1 Running 0 3d15h |
Beta Was this translation helpful? Give feedback.
-
Below is proof of the successful configuration plus stable with better performance: (base) root@H0llyW00dzZ:/# kubectl get hpa
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
one-api-hpa Deployment/one-api 0%/80%, 16%/80% 1 10 1 6d8h |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction:
I am sharing this Kubernetes (k8s) configuration for
one-api
because it has proven to be stable when used with this repository.Note
The backend, written in Go and using the Gin package, is a microservice architecture. Therefore, you don't need to create many pods for
one-api
. A single pod, along withhpa
, is sufficient.Deployment:
Note
For the deployment, even if you initially set
replica 3
, it will be automated adjusted to 1 after you set up the Horizontal Pod Autoscaler (HPA), as shown below.Horizontal Pod Autoscaler (HPA):
Storage:
Note
This storage can be used for SQLite or any other storage needs you may have.
Note
The configuration below is for nginx used with
one-api
. You won't need to configure it manually as you would with docker.Services:
Cluster Role:
Ingress Nginx
Beta Was this translation helpful? Give feedback.
All reactions