Quick Start
The fastest way to deploy Vector on Kubernetes is using the official Helm chart:Agent Deployment (DaemonSet)
Deploy Vector as a DaemonSet to collect logs and metrics from every node in your cluster.Agent ConfigMap
Create a ConfigMap with the agent configuration:Service Account and RBAC
Vector needs permissions to read Kubernetes API:Agent DaemonSet
Aggregator Deployment (StatefulSet)
Deploy Vector as a StatefulSet to aggregate and process data from agents.Aggregator ConfigMap
Aggregator Service
Aggregator StatefulSet
Headless Service for StatefulSet
Complete Deployment
Deploy both agent and aggregator together:Monitoring
ServiceMonitor for Prometheus Operator
Best Practices
Resource Management
- Agent: Start with 100m CPU and 128Mi memory, adjust based on log volume
- Aggregator: Start with 500m CPU and 512Mi memory, scale horizontally
- Use resource limits to prevent resource exhaustion
- Monitor memory usage and adjust as needed
High Availability
- Run multiple aggregator replicas (minimum 2)
- Use PodDisruptionBudgets to prevent all pods being down
- Configure appropriate health checks and readiness probes
- Use pod anti-affinity to spread pods across nodes
Security
- Use dedicated namespace for Vector
- Apply least-privilege RBAC permissions
- Use NetworkPolicies to restrict traffic
- Enable TLS for agent-to-aggregator communication
- Use secrets for sensitive credentials
Configuration Management
- Store configurations in ConfigMaps
- Use
kubectl rollout restartto apply config changes - Version your manifests in Git
- Use Kustomize or Helm for environment-specific configs
Observability
- Enable internal metrics on all instances
- Export metrics to Prometheus
- Set up alerts for high memory usage, processing lag
- Use Vector’s GraphQL API for debugging