# Can't install awx-operator 2.19.1 in k8s

**URL:** <https://forum.ansible.com/t/cant-install-awx-operator-2-19-1-in-k8s/39280>\
**Category:** Get Help\
**Tags:** kubernetes, awx-operator, awx\
**Created:** [December 21, 2024, 4:04pm UTC](https://forum.ansible.com/t/cant-install-awx-operator-2-19-1-in-k8s/39280 "2024-12-21T16:04:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amalovata](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@amalovata](https://forum.ansible.com/u/amalovata)\
**Post date:** [December 21, 2024, 4:04pm UTC](https://forum.ansible.com/t/cant-install-awx-operator-2-19-1-in-k8s/39280/1 "2024-12-21T16:04:00Z")

</div>

I use external postgrescl-15.

```auto
AWX:
  enabled: true
  name: awx
  spec:
    admin_user: "admin"
    admin_password: "123456"
    postgres_configuration_secret: "awx-postgres-configuration"

  postgres:
    enabled: true

```

but pod awx-task is in condition `Init:0/2 `.

```auto
NAME READY STATUS RESTARTS AGE
awx-operator-controller-manager-5ccb88d675-mwbqr 2/2 Running 0 36m
awx-task-f6f48fc4f-2nfhc 0/4 Init:0/2 0 36m
awx-web-66fbbd9579-dd667 2/3 CrashLoopBackOff 11 (25s ago) 36m

```

Here is the log. (There is access to the database.)

```auto
kubectl logs awx-task-f6f48fc4f-2nfhc -n awx -c init-database
[wait-for-migrations] Waiting for database migrations...
[wait-for-migrations] Attempt 1
[wait-for-migrations] Waiting 0.5 seconds before next attempt
[wait-for-migrations] Attempt 2
[wait-for-migrations] Waiting 1 seconds before next attempt
[wait-for-migrations] Attempt 3

```

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [December 21, 2024, 7:18pm UTC](https://forum.ansible.com/t/cant-install-awx-operator-2-19-1-in-k8s/39280/2 "2024-12-21T19:18:02Z")

</div>

When you say it has access to the database , what do you mean? What does the secret look like? Does it have any spaces in the secret values?

---

<div class="post-metadata">

**Author:** ![amalovata](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@amalovata](https://forum.ansible.com/u/amalovata)\
**Post date:** [December 21, 2024, 8:16pm UTC](https://forum.ansible.com/t/cant-install-awx-operator-2-19-1-in-k8s/39280/3 "2024-12-21T20:16:53Z")

</div>

I tried to connect this way, and it connects. No failures.

```auto
kubectl run -it --rm postgres-client --image=postgres --restart=Never -- bash
psql -h 10.10.10.2 -p 5432 -U awx -d awx

```

but I started to look at the logs in more detail, and my problem is 1 to 1 with [AWX web/task pod not launching correctly - "Waiting for database migrations..." and cannot execute awx-manage commands "connection is bad: Name or service not known" · Issue #1636 · ansible/awx-operator · GitHub](https://github.com/ansible/awx-operator/issues/1636). but there is no solution to date.

And I try, but it didn’t help.

```auto
kubectl -n kube-system delete pod -l k8s-app=kube-dns

```

---

<div class="post-metadata">

**Author:** ![amalovata](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@amalovata](https://forum.ansible.com/u/amalovata)\
**Post date:** [December 21, 2024, 8:24pm UTC](https://forum.ansible.com/t/cant-install-awx-operator-2-19-1-in-k8s/39280/4 "2024-12-21T20:24:26Z")

</div>

File postgres\_configuration\_secret.yaml

```auto
---
apiVersion: v1
kind: Secret
metadata:
  name: awx-postgres-configuration
  namespace: awx
stringData:
  host: 10.10.23.45
  port: "5432"
  database: "awx"
  username: "awx"
  password: "123456789"
  sslmode: disable
  target_session_attrs: read-write
  type: managed
type: Opaque

```

and

```auto
kubectl apply -f postgres_configuration_secret.yaml
helm upgrade --install awx-operator ./awx-operator -n awx -f values.yaml

```
