Kubernetes
This guide walks you through deploying Alien Giraffe to your Kubernetes cluster using our official Helm chart, enabling you to run the service in your own cloud infrastructure.
Prerequisites
Section titled “Prerequisites”- Kubernetes cluster (1.24+) running in your cloud provider
- Helm 3.8+ installed on your local machine
- kubectl configured to access your cluster
- Appropriate RBAC permissions to create deployments, services, and secrets
Quick Start
Section titled “Quick Start”1. Add the Alien Giraffe Helm Repository
Section titled “1. Add the Alien Giraffe Helm Repository”# Add the Alien Giraffe Helm repositoryhelm repo add alien-giraffe https://helm.aliengiraffe.com
# Update your local Helm chart repository cachehelm repo update2. Create a Values File
Section titled “2. Create a Values File”Create a values.yaml file with your configuration:
replicaCount: 3
image: repository: aliengiraffe/alien-giraffe tag: latest pullPolicy: IfNotPresent
# License key for your deploymentlicense: key: "${ALIEN_GIRAFFE_LICENSE_KEY}"
# Resource allocationresources: requests: memory: "2Gi" cpu: "1" limits: memory: "4Gi" cpu: "2"
# Service configurationservice: type: ClusterIP port: 8080 targetPort: 8080
# Ingress configuration (optional)ingress: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: alien-giraffe.your-domain.com paths: - path: / pathType: Prefix tls: - secretName: alien-giraffe-tls hosts: - alien-giraffe.your-domain.com
# Data source configurationsdatasources: postgres: - name: "analytics" host: "postgres.your-cloud.com" port: 5432 database: "analytics_db" username: "alien_giraffe_reader" passwordSecret: "postgres-credentials" passwordKey: "password"
s3: - name: "data-lake" region: "us-west-2" bucket: "company-data-lake" credentialsSecret: "aws-credentials"
# Security configurationsecurity: enableNetworkPolicies: true podSecurityContext: runAsNonRoot: true runAsUser: 1000 fsGroup: 1000 containerSecurityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: - ALL
# Persistent storage for cache and temporary datapersistence: enabled: true storageClass: "fast-ssd" accessMode: ReadWriteOnce size: 20Gi
# Monitoring and observabilitymonitoring: enabled: true serviceMonitor: enabled: true interval: 30s prometheusOperator: enabled: true
# Auto-scaling configurationautoscaling: enabled: true minReplicas: 3 maxReplicas: 10 targetCPUUtilizationPercentage: 70 targetMemoryUtilizationPercentage: 803. Create Kubernetes Secrets
Section titled “3. Create Kubernetes Secrets”Before deploying, create the necessary secrets for your data sources:
# Create PostgreSQL credentialskubectl create secret generic postgres-credentials \ --from-literal=password='your-postgres-password' \ -n alien-giraffe
# Create AWS credentials for S3 accesskubectl create secret generic aws-credentials \ --from-literal=access-key-id='your-access-key' \ --from-literal=secret-access-key='your-secret-key' \ -n alien-giraffe
# Create license key secretkubectl create secret generic alien-giraffe-license \ --from-literal=key='your-license-key' \ -n alien-giraffe4. Deploy Using Helm
Section titled “4. Deploy Using Helm”# Create namespacekubectl create namespace alien-giraffe
# Deploy Alien Giraffehelm install alien-giraffe alien-giraffe/alien-giraffe \ --namespace alien-giraffe \ --values values.yamlCloud Provider Specific Configurations
Section titled “Cloud Provider Specific Configurations”AWS EKS
Section titled “AWS EKS”For AWS EKS deployments, use IAM roles for service accounts:
serviceAccount: create: true annotations: eks.amazonaws.com/role-arn: arn:aws:iam::123456789:role/alien-giraffe-role
# Use IRSA instead of static credentialsdatasources: s3: - name: "data-lake" region: "us-west-2" bucket: "company-data-lake" useIRSA: true # Uses IAM role instead of credentialsGoogle GKE
Section titled “Google GKE”For GKE deployments with Workload Identity:
serviceAccount: create: true annotations: iam.gke.io/gcp-service-account: alien-giraffe@your-project.iam.gserviceaccount.com
# Use GKE Workload Identitydatasources: bigquery: - name: "analytics" project: "your-gcp-project" dataset: "analytics_dataset" useWorkloadIdentity: trueAzure AKS
Section titled “Azure AKS”For AKS deployments with managed identity:
podIdentity: enabled: true identityId: "/subscriptions/xxx/resourcegroups/xxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/alien-giraffe"
datasources: azureBlob: - name: "data-lake" storageAccount: "yourstorageaccount" container: "data" useManagedIdentity: trueAdvanced Configuration
Section titled “Advanced Configuration”High Availability Setup
Section titled “High Availability Setup”For production deployments requiring high availability:
replicaCount: 5
# Pod disruption budgetpodDisruptionBudget: enabled: true minAvailable: 2
# Anti-affinity rules to spread pods across nodesaffinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - alien-giraffe topologyKey: kubernetes.io/hostname
# Multi-zone deploymenttopologySpreadConstraints: - maxSkew: 1 topologyKey: topology.kubernetes.io/zone whenUnsatisfiable: DoNotSchedule labelSelector: matchLabels: app.kubernetes.io/name: alien-giraffePrivate Registry
Section titled “Private Registry”If using a private container registry:
image: repository: your-registry.com/alien-giraffe pullPolicy: Always
imagePullSecrets: - name: regcred
# Create the registry secret# kubectl create secret docker-registry regcred \# --docker-server=your-registry.com \# --docker-username=your-username \# --docker-password=your-password \# -n alien-giraffeCustom Security Policies
Section titled “Custom Security Policies”For environments with strict security requirements:
# Network policiesnetworkPolicy: enabled: true ingress: - from: - namespaceSelector: matchLabels: name: frontend - podSelector: matchLabels: app: api-gateway ports: - protocol: TCP port: 8080
# Pod Security StandardspodSecurityPolicy: enabled: true spec: privileged: false allowPrivilegeEscalation: false requiredDropCapabilities: - ALL volumes: - 'configMap' - 'emptyDir' - 'projected' - 'secret' - 'persistentVolumeClaim' runAsUser: rule: 'MustRunAsNonRoot' seLinux: rule: 'RunAsAny' fsGroup: rule: 'RunAsAny'Monitoring and Observability
Section titled “Monitoring and Observability”Prometheus Integration
Section titled “Prometheus Integration”The Helm chart includes Prometheus ServiceMonitor for metrics collection:
# Prometheus will automatically discover and scrape metricsmonitoring: enabled: true serviceMonitor: enabled: true namespace: monitoring labels: prometheus: kube-prometheus interval: 30s path: /metricsGrafana Dashboard
Section titled “Grafana Dashboard”Import our official Grafana dashboard for monitoring:
# Dashboard ID: 18274# Available at: https://grafana.com/grafana/dashboards/18274Key metrics to monitor:
- Query response times
- Data source connection health
- Security rule violations
- Resource utilization
- Cache hit rates
Upgrading
Section titled “Upgrading”To upgrade your Alien Giraffe deployment:
# Update the Helm repositoryhelm repo update
# Check for new versionshelm search repo alien-giraffe/alien-giraffe --versions
# Upgrade to a new versionhelm upgrade alien-giraffe alien-giraffe/alien-giraffe \ --namespace alien-giraffe \ --values values.yaml \ --version 2.0.0Backup and Disaster Recovery
Section titled “Backup and Disaster Recovery”Backing Up Configuration
Section titled “Backing Up Configuration”# Export current Helm valueshelm get values alien-giraffe -n alien-giraffe > backup-values.yaml
# Backup Kubernetes secretskubectl get secrets -n alien-giraffe -o yaml > backup-secrets.yamlDisaster Recovery
Section titled “Disaster Recovery”In case of cluster failure:
# Restore secretskubectl apply -f backup-secrets.yaml
# Redeploy using backed up valueshelm install alien-giraffe alien-giraffe/alien-giraffe \ --namespace alien-giraffe \ --values backup-values.yamlTroubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”-
Pods not starting
Terminal window # Check pod statuskubectl get pods -n alien-giraffe# View pod logskubectl logs -n alien-giraffe deployment/alien-giraffe# Describe pod for eventskubectl describe pod -n alien-giraffe <pod-name> -
Connection issues to data sources
Terminal window # Verify secrets are createdkubectl get secrets -n alien-giraffe# Test network connectivity from podkubectl exec -n alien-giraffe deployment/alien-giraffe -- nc -zv postgres.your-cloud.com 5432 -
Performance issues
Terminal window # Check resource usagekubectl top pods -n alien-giraffe# View HPA statuskubectl get hpa -n alien-giraffe
Security Best Practices
Section titled “Security Best Practices”- Use Network Policies - Restrict traffic to only necessary connections
- Enable RBAC - Use minimal permissions for service accounts
- Encrypt Secrets - Use sealed-secrets or external secret managers
- Regular Updates - Keep the Helm chart and container images updated
- Audit Logging - Enable Kubernetes audit logs for compliance
Next Steps
Section titled “Next Steps”- Configure Data Source Security
- Set up Monitoring and Alerts
- Learn about Performance Tuning