Kubernetes ☸️
This guide walks you through the steps to deploy AiAgentNexus in a Kubernetes environment using the kubectl command-line tool.
Initial Deployment
Step 1: Clone the AiAgentNexus Repository
AiAgentNexus RepositoryStart by cloning the repository and navigating to the Kubernetes configuration files:
git clone https://github.com/ErnestikX/AiAgentNexus
cd ./AiAgentNexus/docs/k8sStep 2: Create a Namespace
Create a dedicated namespace for the deployment to isolate resources:
kubectl create namespace ns-AiAgentNexusStep 3: Configure Secrets in env-secret.yaml
env-secret.yamlThe env-secret.yaml file is used to store sensitive configuration values as Kubernetes Secrets. Since Secrets are Base64-encoded by default, avoid committing this file to version control to prevent exposing sensitive information.
Open the provided
env-secret.yamltemplate in a text editor:nano env-secret.yamlFill in the necessary details as needed. (All variables are optional.)
Step 4: Apply Kubernetes Resources
Deploy the application by applying the provided resource manifests:
This command creates the necessary resources, including deployments and secrets.
Step 5: Check Resource Status
Verify that the deployment and its associated resources are running correctly:
Expected output:
Step 6: Test the Service
To test the deployed service, forward the service port to your local machine:
Once port-forwarding is active, you can access the service locally by visiting http://localhost:3000 in your browser to view the AiAgentNexus homepage.
Updating AiAgentNexus
AiAgentNexusTo update the deployment with the latest version:
Pull the latest changes from the repository:
Apply the updated deployment manifest:
This triggers a rolling update to seamlessly apply changes with minimal downtime.
Additional Considerations
Use an Ingress Controller or Load Balancer
For production environments, it is recommended to set up an Ingress Controller or a Load Balancer instead of relying on port-forwarding. These options provide better scalability, routing, and external access.
If you’re deploying AiAgentNexus behind a reverse proxy, ensure it supports streaming. For detailed instructions, refer to our Reverse Proxy Deployment Guide.