Kubernetes: Getting to production
Are you ready to deploy and test Weaviate on a self-managed K8s (Kubernetes) cluster? This guide shows how to validate Weaviate’s capabilities in your enterprise environment.
At the end of this guide, expect to have:
- A configured Helm-based deployment and networking setup
- Basic scaling, persistent storage, and resource management
- TLS, RBAC, and security best practices implemented
- Monitoring, logging, and backup strategies enabled
Prerequisites
Section titled “Prerequisites”Before beginning, ensure that you have the following:
- Basic Kubernetes and containerization conceptual knowledge
- Basic experience with Helm and
kubectl - A running Kubernetes cluster with Weaviate installed
kubectlinstalled- Helm installed
Step 1: Configure your Helm Chart
Section titled “Step 1: Configure your Helm Chart”- Use the official Weaviate Helm chart for your installation:
helm repo add weaviate https://weaviate.github.io/weaviate-helm
helm install my-weaviate weaviate/weaviate- Customize the values to fit your enterprise requirements (e.g., resource allocation, storage settings).
- Deploy the chart and verify pod health.
Step 2: Network Security
Section titled “Step 2: Network Security”- Configure an ingress controller to securely expose Weaviate.
- Enable TLS with a certificate manager and enforce TLS encryption for all client-server communication.
- Assign a domain name for external access.
- Implement RBAC or admin lists to restrict user access.
An example of RBAC enabled on your Helm chart
authorization:
rbac:
enabled: true
root_users:
- admin_user1
- admin_user2An example of admin lists implemented on your Helm chart (if not using RBAC)
admin_list:
enabled: true
users:
- admin_user1
- admin_user2
- api-key-user-admin
read_only_users:
- readonly_user1
- readonly_user2
- api-key-user-readOnlyStep 3: Scaling
Section titled “Step 3: Scaling”- Implement horizontal scaling to ensure high availability:
replicaCount: 3- Define CPU/memory limits and requests to optimize pod efficiency.
An example of defining CPU and memory limits and cores
resources:
requests:
cpu: "500m"
memory: "1Gi"
limits:
cpu: "2"
memory: "4Gi"Step 4: Monitoring and Logging
Section titled “Step 4: Monitoring and Logging”- Use Prometheus and Grafana to collect and analyze performance metrics.
- Implement alerting for issue resolution.
An example of enabling service monitoring
serviceMonitor:
enabled: true
interval: 30s
scrapeTimeout: 10sStep 5: Upgrades and Backups
Section titled “Step 5: Upgrades and Backups”- Use the rolling update strategy used by Helm to minimize downtime.
An example of configuring the rolling update strategy.
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0- Test new Weaviate versions before deploying into production.
- Implement disaster recovery procedures to ensure that data is restored quickly.
Conclusion
Section titled “Conclusion”Voila! You now have a deployment that is somewhat ready for production. Your next step will be to complete the self-assessment and identify any gaps.
Next Steps: Production Readiness Self-Assessment
Section titled “Next Steps: Production Readiness Self-Assessment”Questions and feedback
Section titled “Questions and feedback”Have a question or feedback? Here's how to reach us.