-
-
Notifications
You must be signed in to change notification settings - Fork 183
Setup Kubernetes
Thanks to @zucher for the PR and Wiki guide Add Helm chart #157
Ensure you have the following tools installed:
- Helm: Install Helm
- kubectl: Configured to communicate with your Kubernetes cluster
- Git: Installed on your system
Verify the Nvidia GPU operator is correctly installed on your Kubernetes cluster (see Installing the NVIDIA GPU Operator)
Clone the repository containing the Kokoro-FastAPI Helm chart.
git clone https://github.com/remsky/Kokoro-FastAPI.git
cd Kokoro-FastAPI/charts/kokoro-fastapi
Navigate to the directory with the Helm chart and install it using Helm.
helm install kokoro-fastapi . --namespace <target-namespace> --create-namespace
This command installs the chart in the target-namespace
namespace, creating the namespace if it doesn't exist.
Check that your application is running by listing the resources in the namespace.
kubectl get all -n <target-namespace>
If you need to customize the installation, you can use a custom values.yaml
file or override specific values directly via command-line arguments.
Create your own values.yaml
file with custom configurations and install the chart using it:
helm install kokoro-fastapi . --namespace <target-namespace> --create-namespace -f my-custom-values.yaml
Here is an example of a simple values.yaml
file:
replicaCount: 2
image:
repository: ghcr.io/remsky/kokoro-fastapi-gpu
tag: v0.2.1
pullPolicy: IfNotPresent
ingress:
enabled: true
host:
name: my-kokoro-endpoint.dev
...
You can override specific values directly in the Helm install command:
helm install kokoro-fastapi . \
--namespace <target-namespace> \
--create-namespace \
--set replicaCount=2 \
--set image.tag=v0.2.1
To update your existing deployment with new configurations, use the Helm upgrade command:
helm upgrade kokoro-fastapi . -n <target-namespace> -f my-custom-values.yaml
Or using directly overridden values:
helm upgrade kokoro-fastapi . \
-n <target-namepsace> \
--set replicaCount=1
-
Rollback: If something goes wrong, you can rollback to the previous version:
helm rollback kokoro-fastapi -n <target-namepsace>
See sidebar for pages