The AWX Operator is designed for production deployments and provides enterprise-grade reliability, scalability, and high availability.
Overview
The AWX Operator is a Kubernetes operator that manages the complete lifecycle of AWX deployments. It handles:- Automated Deployment: Deploys all AWX components as Kubernetes resources
- Configuration Management: Manages AWX configuration through Kubernetes Custom Resources
- Upgrades: Automates AWX upgrades with minimal downtime
- Scaling: Supports horizontal scaling of AWX components
- High Availability: Enables multi-replica deployments for reliability
- Backup & Restore: Provides mechanisms for data backup and recovery
Prerequisites
Before installing the AWX Operator, ensure you have:Kubernetes or OpenShift Cluster
Kubernetes or OpenShift Cluster
A running Kubernetes (1.21+) or OpenShift cluster with:
- Sufficient resources for AWX components (minimum 4GB RAM, 2 CPU cores)
- A storage class for persistent volumes
- Network access to container registries
- LoadBalancer or Ingress capability for external access
kubectl or oc CLI
kubectl or oc CLI
The Kubernetes command-line tool (
kubectl) or OpenShift CLI (oc) installed and configured to access your cluster.Cluster Admin Permissions
Cluster Admin Permissions
Administrator-level permissions on the cluster to:
- Create namespaces
- Install Custom Resource Definitions (CRDs)
- Create RBAC roles and bindings
- Deploy the operator
Kustomize (Optional)
Kustomize (Optional)
Kustomize for customizing Kubernetes manifests. Kustomize is built into
kubectl version 1.14 and later.Installation Methods
The AWX Operator can be installed using multiple methods. Choose the one that best fits your environment:- Kustomize (Recommended)
- Operator Lifecycle Manager
- Helm Chart
Install using Kustomize
This is the most flexible installation method and is recommended for most users.Create kustomization file
Create a
kustomization.yaml file:kustomization.yaml
Replace
2.19.1 with the latest stable release version from the AWX Operator releases page.Deploying AWX
Once the operator is installed, you can deploy an AWX instance:Create AWX custom resource
Create a file named
awx-instance.yaml with your AWX configuration:awx-instance.yaml
Monitor the deployment
Watch the deployment progress:The deployment typically takes 5-10 minutes. You’ll see pods for:
- PostgreSQL database
- AWX web interface
- AWX task executor
- Redis cache
Accessing AWX
After deployment, access the AWX web interface:- LoadBalancer
- Ingress
- Port Forward
If you configured Access AWX at
service_type: LoadBalancer:http://<EXTERNAL-IP> in your browser.Configuration Options
The AWX Operator supports extensive configuration through the AWX custom resource spec:Resource Requirements
Resource Requirements
Configure CPU and memory limits:
Storage Configuration
Storage Configuration
Configure persistent storage:
External Database
External Database
Use an external PostgreSQL database:Create the secret:
Custom Images
Custom Images
Use custom AWX or Redis images:
Replicas and Scaling
Replicas and Scaling
Configure multiple replicas for high availability:
Upgrading AWX
To upgrade AWX to a new version:Update operator
First, upgrade the AWX Operator to a compatible version by updating your kustomization or Helm chart.
Apply changes
Apply the updated configuration:The operator will perform a rolling upgrade with minimal downtime.
Backup and Restore
The AWX Operator provides built-in backup and restore capabilities:Creating a Backup
awxbackup.yaml
Restoring from Backup
awxrestore.yaml
Troubleshooting
Operator pod not starting
Operator pod not starting
Check operator logs:Common issues:
- Insufficient RBAC permissions
- Resource constraints
- CRD installation failures
AWX pods in pending state
AWX pods in pending state
Check resource availability:Common causes:
- Insufficient cluster resources
- Storage provisioning issues
- Image pull failures
Database connection issues
Database connection issues
Verify PostgreSQL pod and service:Check database credentials in secrets:
Cannot access AWX web interface
Cannot access AWX web interface
Verify service and ingress configuration:Check AWX pod logs:
Additional Resources
- AWX Operator GitHub Repository
- AWX Operator Documentation
- AWX Operator Examples
- Kubernetes Documentation
- OpenShift Documentation
For the most up-to-date installation instructions and configuration options, always refer to the official AWX Operator documentation.