Working with AWX on Kubernetes I was able to create a local folder and pass it to the web container but the AWX UI does not see the playbooks but the container does.
Can anyone share documentation on how to expose from a localhost /path to the AWX UI?
Here is my deployment file:
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
- name: manual-projects
mountPath: /var/lib/awx/projects
extra_volumes: |
- name: static-data
persistentVolumeClaim:
claimName: public-static-data-pvc
- name: manual-projects
hostPath:
path: /var/lib/awx/projects
When I execute this on the container I'm able to see the path and file
> [lab01@localhost awx-operator]$ kubectl exec -it deploy/awx-web -c
> awx-web -n awx -- ls -l /var/lib/awx/projects/
> -rwxrwxr-x. 1 awx root 142 Jan 31 21:34 playbook.yml
but on the AWX UI I'm not.
You can try
kubectl port-forwardExample
Where 8080 is your local port, you can try to browse locally with
localhost:8080for your UI