This example demonstrates an agent-based deployment pattern with the Inference Gateway using:
- Custom logs analyzer agent
- Helm chart for gateway deployment
- Test deployment for agent monitoring
- Gateway: Inference Gateway deployed via helm chart
- Agent: Custom logs analyzer with cluster-wide access
- Test Deployment: Failing deployment for agent monitoring
- Task
- kubectl
- helm
- ctlptl (for cluster management)
- First deploy the cluster and registry:
task deploy-infrastructure- Deploy Inference Gateway:
task deploy-inference-gateway- Configure the API for the provider used in this example - Groq:
kubectl -n inference-gateway apply --server-side -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: inference-gateway
namespace: inference-gateway
type: Opaque
stringData:
GROQ_API_KEY: ""
EOFReplace GROQ_API_KEY with your actual API key and apply it.
And restart the gateway to apply the changes:
kubectl -n inference-gateway rollout restart deployment inference-gateway
kubectl -n inference-gateway rollout status deployment inference-gateway- Build and push logs analyzer image (after registry is ready):
task build-logs-analyzer-agent- Deploy the logs analyzer and test deployment:
task deploy-logs-analyzer-agent- Monitor agent logs:
kubectl logs -f deployment/logs-analyzer -n logs-analyzer- Edit YAMLs in
logs-analyzer/directory - Configure log collection patterns as needed
- Rebuild and redeploy after changes:
task build-logs-analyzer
task deploy-agent- Edit YAMLs in
failing-deployment/directory - Simulate different failure scenarios
task clean