AWX GUI Not reachable without port forward

I have followed the basic deployment docs to install AWX on UBUNTU 22.04: Basic install - Ansible AWX Operator Documentation

Everything seems to run fine and I can use it however to access GUI I am forced to do port-forwarding like so:

kubectl port-forward svc/awx-service --address <my external ip> 8080:80 &> /dev/null &

My awx.yaml:

---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx
spec:
  service_type: nodeport

kustomization.yaml:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  # Find the latest tag here: https://github.com/ansible/awx-operator/releases
  - github.com/ansible/awx-operator/config/default?ref=2.5.3
  - awx.yaml

# Set the image tags to match the git version from above
images:
  - name: quay.io/ansible/awx-operator
    newTag: 2.5.3

# Specify a custom namespace in which to install AWX
namespace: awx

minikube service list output:

|---------------|-------------------------------------------------|--------------|---------------------------|
|   NAMESPACE   |                      NAME                       | TARGET PORT  |            URL            |
|---------------|-------------------------------------------------|--------------|---------------------------|
| awx           | awx-operator-controller-manager-metrics-service | No node port |                           |
| awx           | awx-postgres-13                                 | No node port |                           |
| awx           | awx-service                                     | http/80      | http://192.168.49.2:30226 |
| default       | kubernetes                                      | No node port |                           |
| ingress-nginx | ingress-nginx-controller                        | http/80      | http://192.168.49.2:30973 |
|               |                                                 | https/443    | http://192.168.49.2:31202 |
| ingress-nginx | ingress-nginx-controller-admission              | No node port |                           |
| kube-system   | kube-dns                                        | No node port |                           |
|---------------|-------------------------------------------------|--------------|---------------------------|

Before I enabled port forward (which is not permanent) I have tried doing curl on the server where AWX is installed to http://192.168.49.2:30226 and it was successful, however when i tried doing curl(from the same server) to http://localhost:80 or curl to http://<my external ip>:80 i was getting connection refused.

Not sure what can i do here, I have tried setting up nodeport service without any success:
kubectl expose service awx-service --type=NodePort --name=awx-nodeport --port=8080 --target-port=80

My firewall and iptables are disabled, as this is our lab unit. I am new to kubernetes and networking in kube clusters so any guidance would be appreciated. Also I have configured all the jobs etc on AWX so I do not want to lose this so if there are solutions please suggest those that won’t destroy my setup. :slight_smile:

Hi there

Minikube runs as a container on your host machine and when you expose a “NodePort” service on minikube it exposes it on the minikube’s container

that’s why u got http://192.168.49.2:30226

this is not accessible from outside of your host machine and the port is not mapped to your local host

this is a guide that a lot of community member uses for hosting awx on k3s maybe this will be helpful

1 Like