š” Solution: Scenario 3 ā Node selector & resource issues
This page provides the detailed solutions for the issues presented in Scenario 3. Review these steps after you have attempted the diagnosis and resolution yourself.
š Problem 1: Database pod scheduling failure
Diagnosis
The PostgreSQL Database pods were unable to be scheduled because they had an invalid nodeSelector assigned in the CR. The scheduler could not find any node matching the criteria, so the pods remained in a Pending state indefinitely.
š ļø Resolution: Correcting node scheduling
The fix involves modifying the database configuration within the main Ansible Automation Platform Custom Resource (CR).
1. Modify the database configuration in the CR
In the OpenShift Console:
-
Navigate to Ecosystem ā Installed Operators and select your namespace.
-
Click on Ansible Automation Platform in the operator list.
-
Click the AnsibleAutomationPlatform tab and click on your AAP instance.
-
Switch to the YAML tab.
You have two valid options:
-
Option A: Specify a valid selector: replace the incorrect
nodeSelectorwith a valid label:spec: database: nodeSelector: kubernetes.io/os: linux -
Option B: Remove the selector: delete the
nodeSelectorfield entirely from the database section of the CR to allow scheduling on any available node.
š Problem 2: API pod resource exhaustion
Diagnosis
The API pods were failing due to oversized resource requests and limits defined in the CR. The requests exceeded the available node or cluster resources, preventing pod startup.
ā»ļø Final reconciliation
After both CR modifications are applied, the Operator must reconcile the environment.
In the OpenShift Console, navigate to Workloads ā Pods and select your namespace.
Find the database pod ({username}-aap-postgres-15-0), click the three-dot menu on the right, and select Delete Pod.
Then find the Gateway Operator manager pod (aap-gateway-operator-controller-manager-…), click the three-dot menu, and select Delete Pod.