ansible/awx-operator
View on GitHubInstalling latest awx on latest kubernetes - a problem with mounts when raising postgres
Open
#1,489 opened on Jul 16, 2023
communityhelp wanted
Repository metrics
- Stars
- (1,488 stars)
- PR merge metrics
- (PR metrics pending)
Description
Please confirm the following
- I agree to follow this project's code of conduct.
- I have checked the current issues for duplicates.
- I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.
Bug Summary
I'm trying to just install AWX. Unfortunately, the official documentation is incorrect and does not contain information about problems with (persistents?)volumes/mounts/etc In other Internet sources, the documentation is more understandable, but also non-working
Please fix my current bug and make actual documentation for the first installation of AWX
AWX Operator version
2.4.0 (latest)
AWX version
22.5.0 (latest)
Kubernetes platform
kubernetes
Kubernetes/Platform version
v1.27.3 (latest)
Modifications
no
Steps to reproduce
# my documentation (cos official is doesn't work too): https://computingforgeeks.com/how-to-install-ansible-awx-on-ubuntu-linux/
apt-get update
apt -y upgrade
apt install build-essential jq -y
export KUBECONFIG=/etc/kubernetes/admin.conf
kubectl get nodes
kubectl version --short
cd awx
git clone https://github.com/ansible/awx-operator.git
export NAMESPACE=awx
kubectl create ns ${NAMESPACE}
kubectl config set-context --current --namespace=$NAMESPACE
cd awx-operator/
RELEASE_TAG=`curl -s https://api.github.com/repos/ansible/awx-operator/releases/latest | grep tag_name | cut -d '"' -f 4`
echo $RELEASE_TAG
git checkout $RELEASE_TAG
# export NAMESPACE=awx
make deploy
kubectl get pods
watch kubectl get pods
mkdir --parents /var/lib/projects
chmod 777 -R /var/lib/projects
# waiting...
cat <<EOF | kubectl create -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: static-data-pvc
namespace: awx
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 20Gi
EOF
cat << EOF > awx-deploy.yml
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
spec:
service_type: nodeport
projects_persistence: true
projects_storage_access_mode: ReadWriteOnce
web_extra_volume_mounts: |
- name: static-data
mountPath: /var/lib/projects
extra_volumes: |
- name: static-data
persistentVolumeClaim:
claimName: static-data-pvc
EOF
kubectl apply -f awx-deploy.yml
watch kubectl get pods -l "app.kubernetes.io/managed-by=awx-operator"
kubectl get pods -l "app.kubernetes.io/managed-by=awx-operator"
Expected results
NAME READY STATUS RESTARTS AGE
awx-postgres-13-0 1/1 Running 0 75s
Actual results
NAME READY STATUS RESTARTS AGE
awx-postgres-13-0 0/1 Pending 0 7m23s
Additional information
No response
Operator Logs
# kubectl describe pods awx-postgres-13-0
Name: awx-postgres-13-0
Namespace: awx
Priority: 0
Service Account: default
Node: <none>
Labels: app.kubernetes.io/component=database
app.kubernetes.io/instance=postgres-13-awx
app.kubernetes.io/managed-by=awx-operator
app.kubernetes.io/name=postgres-13
app.kubernetes.io/part-of=awx
controller-revision-hash=awx-postgres-13-54b9b564f4
statefulset.kubernetes.io/pod-name=awx-postgres-13-0
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: StatefulSet/awx-postgres-13
Containers:
postgres:
Image: postgres:13
Port: 5432/TCP
Host Port: 0/TCP
Requests:
cpu: 10m
memory: 64Mi
Environment:
POSTGRESQL_DATABASE: <set to the key 'database' in secret 'awx-postgres-configuration'> Optional: false
POSTGRESQL_USER: <set to the key 'username' in secret 'awx-postgres-configuration'> Optional: false
POSTGRESQL_PASSWORD: <set to the key 'password' in secret 'awx-postgres-configuration'> Optional: false
POSTGRES_DB: <set to the key 'database' in secret 'awx-postgres-configuration'> Optional: false
POSTGRES_USER: <set to the key 'username' in secret 'awx-postgres-configuration'> Optional: false
POSTGRES_PASSWORD: <set to the key 'password' in secret 'awx-postgres-configuration'> Optional: false
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
Mounts:
/var/lib/postgresql/data from postgres-13 (rw,path="data")
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-mpdt5 (ro)
Conditions:
Type Status
PodScheduled False
Volumes:
postgres-13:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: postgres-13-awx-postgres-13-0
ReadOnly: false
kube-api-access-mpdt5:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 6m42s default-scheduler 0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
Warning FailedScheduling 82s default-scheduler 0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..