Kubernetes Setup
Detailed guide for deploying Kubiya runners on Kubernetes
Kubernetes Setup for Runners
This guide provides in-depth instructions for deploying and configuring Kubiya runners on Kubernetes environments. Whether you're using a managed service like EKS, GKE, or AKS, or a self-hosted Kubernetes cluster, these steps will help you set up runners properly.
Kubernetes Requirements
Before deploying a Kubiya runner, ensure your Kubernetes environment meets these requirements:
- Kubernetes version 1.16 or higher
- A default StorageClass configured (for persistent storage)
- RBAC enabled
- Outbound internet access from the cluster
- At least 1 vCPU and 2GB memory available
Preparation
Create a Namespace
Create a dedicated namespace for Kubiya components:
Configure Service Account
Create a service account for the runner:
Set Up Registry Access
Create a secret for pulling images from Kubiya's registry:
Deployment Methods
Using Manifest Files
Create the following YAML files:
Create RBAC Configuration
Save this as kubiya-rbac.yaml
:
Create Runner Deployment
Save this as kubiya-runner.yaml
:
Create Persistent Storage (Optional)
Save this as kubiya-storage.yaml
:
Apply Configurations
Apply all the configurations:
Advanced Configurations
High Availability Setup
For production environments, consider a high-availability configuration:
Resource Quotas
For better resource management, set up namespace quotas:
Network Policies
Secure your runner with network policies:
Integration with Kubernetes Distributions
Amazon EKS
For EKS-specific deployments:
-
IRSA Integration:
Update the service account with IAM role annotation:
-
Node Group Selection:
Use node selectors to target specific node groups:
Monitoring and Logging
Prometheus Integration
Enable Prometheus metrics for your runner:
Logging Configuration
Configure logging to suit your environment:
Troubleshooting
Common Issues and Solutions
-
Runner not connecting:
- Check credentials (RUNNER_ID and RUNNER_SECRET)
- Verify network connectivity to api.kubiya.ai
- Check pod logs using
kubectl logs -n kubiya deployment/kubiya-runner
-
Permission issues:
- Verify RBAC configurations
- Check service account permissions
- Inspect logs for permission denied errors
-
Resource constraints:
- Monitor resource usage with
kubectl top pods -n kubiya
- Consider increasing resource limits
- Monitor resource usage with
-
Image pull errors:
- Verify registry secret is correctly configured
- Check image name and tag are correct
Next Steps
- Configure runner permissions for your specific use cases
- Deploy the Enforcer service for advanced policy control
- Set up your first agent to work with your runner