Running with Kubernetes (k8s)
This guide explains how to deploy and run the Rated Log Indexer in a Kubernetes environment.
Prerequisites
Access to a Kubernetes cluster
kubectlCLI tool installed and configuredBasic understanding of Kubernetes concepts (ConfigMaps, Deployments)
Rated Log Indexer credentials and configuration details
Setup Instructions
1. Prepare Configuration
Navigate to the
configdirectory where you'll findrated-configmap.example.yamlCreate your configuration file:
cp config/rated-configmap.example.yaml config/rated-configmap.yamlModify the configuration file with your specific settings
The example file includes both the ConfigMap for your indexer configuration and the Deployment specification needed for Kubernetes.
2. Deploy to Kubernetes
Apply the configurations to your cluster:
kubectl apply -f config/rated-configmap.yaml3. Verify Deployment
Check the status of your deployment:
# Check deployment status
kubectl get deployments rated-log-indexer
# Check pod status
kubectl get pods -l app=rated-log-indexer
# View logs
kubectl logs -l app=rated-log-indexerConfiguration Reference
ConfigMap Settings
The ConfigMap contains your Rated Log Indexer configuration in YAML format. Key sections include:
inputs: Configure your data sourcesintegration: Specify the integration type (e.g., cloudwatch)filters: Define how to process and transform logsoffset: Configure ingestion tracking and start points
output: Configure where processed data should be sentsecrets: Manage sensitive information
Deployment Settings
The Deployment configuration defines how the indexer runs in your cluster:
replicas: Number of indexer instances (default: 1)image: Docker image to use (default:ratedlabs/rated-log-indexer:latest)volumeMounts: Configuration file mountingvolumes: ConfigMap volume definition
Security Considerations
Sensitive Data: Consider using Kubernetes Secrets instead of ConfigMap for sensitive values
RBAC: Ensure appropriate RBAC policies are in place for the indexer pod
Troubleshooting
Common Issues
Pod Startup Failures
kubectl describe pod -l app=rated-log-indexerConfiguration Issues
# View ConfigMap
kubectl get configmap indexer-config -o yaml
# Check container logs
kubectl logs -l app=rated-log-indexerResource Constraints
kubectl top pod -l app=rated-log-indexerMaintenance
Updating Configuration
Update the ConfigMap:
kubectl apply -f config/rated-configmap.yamlRestart the pods:
kubectl rollout restart deployment rated-log-indexerVersion Updates
To update the indexer version:
kubectl set image deployment/rated-log-indexer indexer=ratedlabs/rated-log-indexer:new-versionBest Practices
Always use version tags for the Docker image instead of
latestImplement appropriate resource requests and limits
Set up monitoring and alerting
Regularly backup your configuration
Use namespaces to isolate the indexer deployment
Implement liveness and readiness probes
Last updated

