Not able to access AWX portal via server ip, currently its is working on local host

Hello, I have deployed AWX with the help of KIND clusters and Currently AWX portal is opening on local host but i want to use the server ip to access the AWX portal.
Below is the o/p of deployment file.

apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
namespace: awx
spec:
service_type: nodeport
ingress_type: none
postgres_storage_class: standard

O/p of service of awx operator.

[root@AWX-TOWER lib]# kubectl get svc -n awx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
awx-operator-controller-manager-metrics-service ClusterIP 10.96.162.19 8443/TCP 10d
awx-postgres-13 ClusterIP None 5432/TCP 10d
awx-service NodePort 10.96.192.110 80:30902/TCP 10d
[root@AWX-TOWER lib]#

Please guide how can i expose server ip.

Regards,
Manmeet Singh

Hi @Manmeet_singh

Welcome to the Ansible forum!

Is this a single node setup or do you have multiple servers in your cluster?

Best regards,

Joe

Hello @iwt-cmd ,

It is single node setup.

When I deployed AWX , KIND cluster (Kubernetes in Docker) built.

Cluster info is as below.

[root@AWX-TOWER ~]# kubectl cluster-info --context kind-awx
Kubernetes control plane is running at https://127.0.0.1:39375
CoreDNS is running at https://127.0.0.1:39375/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

Regards,
Manmeet Singh

I don’t have experience with KIND so there may be some other config that you need but have you tried going to https://<ip_of_KIIND_node>:30902?

The KIND documentation seems to point an additional config needed at cluster creation time if you’re using the Docker Desktop application but that’s not needed if you’re just running Docker from the CLI. The extra port mappings also appear to be needed if you’re traffic is originating from outside the host that is running KIND.
kind – Configuration

Hello @iwt-cmd

I tried to hit http://10.96.192.110:30902/ with no success.

I have used LINUX instance to host this.

Regards,
Manmeet Singh

Is 10.96.192.110 on your local network? Kubernetes and Docker both setup internal only networks to allow pods/containers to communicate but those addresses aren’t generally accessible from the outside. That 10.96… address looks like one of those internal networks.

If you feel comfortable, you can also post the output of “ip addr” on the KIND host and we can verify.

Best regards,

Joe

Hello Joe,

I tried port forward to 8080:80 to awx service with this command

/usr/local/bin/kubectl port-forward --address 0.0.0.0 service/awx-service -n awx 8080:80

and now i can access the awx portal on my serverip:8080.

Thanks for all your reverts, Will monitor the environment for few weeks before moving it to production. Will post if i need any help.

Regards,
Manmeet Singh

1 Like

Glad you got it working! One thing to remember is that if the host reboots, that you will probably have to rerun the kubectl port-forward command. Before you move to production, you may want to test this and look into if KIND can handle this port-forwarding within a config that will survive reboot or create a start-up task (crontab, systemd service, etc…) on the host to run the port-forward automatically.

Best regards,

Joe

Thanks Joe, I already configured Systemd service for port forwarding.

I will definitely test the behavior on rebooting this machine.

Appreciate your response.

Regards,
Manmeet Singh