Мне просто интересно, где мне открыть этот порт.Если бы вы могли просто дать мне идею, было бы здорово.
Я пытаюсь добавить awx в мои kubernetes, используя это решение:
https://github.com/rossedman/ansible-awx-kubernetes
Столкнувшись со следующей проблемой:
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
awx-cache-5c44475fcc-rfwvj 1/1 Running 0 41m 10.244.2.75 hs2-inf-v-ans07 <none> <none>
awx-db-59789d55b9-tzlck 0/1 Pending 0 41m <none> <none> <none> <none>
awx-queue-7db5697f96-q46wk 1/1 Running 0 41m 10.244.2.76 hs2-inf-v-ans07 <none> <none>
awx-task-69dfcc4d5f-qz7gx 1/1 Running 0 41m 10.244.2.77 hs2-inf-v-ans07 <none> <none>
awx-web-5669b4f766-j95lq 1/1 Running 0 41m 10.244.2.78 hs2-inf-v-ans07 <none> <none>
[root@hs2-inf-v-ans09 ~]#
Журналы:
2019-05-22 23:18:23,835 INFO exited: daphne (exit status 1; not expected)
2019-05-22 23:18:24,838 INFO spawned: ‘daphne’ with pid 2019
2019-05-22 23:18:25,839 INFO success: daphne entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Traceback (most recent call last):
File “/var/lib/awx/venv/awx/bin/daphne”, line 11, in <module>
…
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/psycopg2/__init__.py”, line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: could not connect to server: Connection refused
Is the server running on host “awx-db” (10.109.109.19) and accepting
TCP/IP connections on port 5432?
Мой модуль awx-db находится в состоянии ожидания, это кластер kubernetes из 3 узлов
[root@hs2-inf-v-ans09 ~]# kubectl describe pods awx-db-59789d55b9-tzlck
Name: awx-db-59789d55b9-tzlck
Namespace: default
Priority: 0
PriorityClassName: <none>
Node: <none>
Labels: app=awx
pod-template-hash=59789d55b9
role=database
Annotations: <none>
Status: Pending
IP:
Controlled By: ReplicaSet/awx-db-59789d55b9
Containers:
postgres:
Image: postgres:9.6
Port: 5432/TCP
Host Port: 0/TCP
Environment:
POSTGRES_DB: awx
POSTGRES_PASSWORD: awxpass
POSTGRES_USER: awx
PGDATA: /var/lib/postgresql/data/pgdata
Mounts:
/var/lib/postgresql/data from data-volume (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-2gqld (ro)
Conditions:
Type Status
PodScheduled False
Volumes:
data-volume:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: awx-db
ReadOnly: false
default-token-2gqld:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-2gqld
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 2m1s (x50 over 72m) default-scheduler pod has unbound immediate PersistentVolumeClaims
[root@hs2-inf-v-ans09 ~]#
Как лучше всегорешить это?