[Share] Configuration Kubernetes (k8s) for one-api #4114
H0llyW00dzZ
started this conversation in
Ideas
Replies: 6 comments
Another NoteNote For |
0 replies
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 |
0 replies
|
bump docs updated |
0 replies
|
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 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


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-apibecause 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
All reactions