Cloud Malaya Lab
  • Home Cloud Lab
    • Architecture
    • DNS Server
  • DevOps & DevSecOps
    • Kubernetes
      • Fundamental
        • Taints in Kubernetes
        • Kubernetes Observability (Monitoring) Guide
        • DNS in Kubernetes (CoreDNS)
        • Storage in Kubernetes
          • Container Storage Interface - CSI
          • Ephemeral Storage Explain
        • Cluster CPU & Memory Inspections
        • Open Source and Free Storage Solution Kubernetes
      • PoC Lab
        • Configure Access to Multiple Cluster using KUBE_CONFIG
        • High Availability Portable Mini Kubernetes Data Center with K3s
          • Lab 1: Build the K3s Infrastructure
          • Lab 2: Automate the K3s clusters deployment with Ansible
          • Lab 3: Multi Master K3s kubeconfig files for smooth accessibility
          • Lab 4: Network Configurations & Tools
        • AWX/Ansible Tower Deployment on Kubernetes
          • Lab 1 - Understanding Requirements
          • Lab 2 - AWX,AWX Operator Configurations & Deployments
          • Lab 3 - Ingress Networking & Connectivity via Nginx
          • Lab 4: AWX Web Console & accessibility on LAN
        • Troubleshooting: Ansible Tower - Reset admin password
    • Monitoring & Observability
      • Splunk
        • Splunk Deployment for SME (Malay Version)
    • System Administration - Linux
      • RedHat Derivatives
        • Add User to Sudoers
        • Yum Update vs Yum Upgrade
        • DNF update vs upgrade
        • SMP PREEMPT_DYNAMIC Definitions
      • Virtualization
        • KVM
      • Storage
  • Digital Infrastructure & Cloud Solutions
    • Solution & System Design
      • Public Cloud
        • Fundamental
          • AWS
          • Azure
          • GCP
        • Lab
          • Simple CD menggunakan Github Action
      • Private Cloud & On-Premise
      • On-Premise to Cloud Design
        • AWS Direct Connect
      • High Availability & Fault Tolerance Design
      • Disaster Recovery
Powered by GitBook
On this page
  • Lab Objective
  • Deployment Steps
  1. DevOps & DevSecOps
  2. Kubernetes
  3. PoC Lab
  4. AWX/Ansible Tower Deployment on Kubernetes

Lab 3 - Ingress Networking & Connectivity via Nginx

Lab Objective

In this lab we will establish Ingress networking via Nginx Ingress Controller so we are able to access the AWX from the FQDN address.

Deployment Steps

Step 1: Create Nginx Ingress

Create awx-nginx-ingress.ymlfile with the following content

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: awx-ingress
  namespace: awx
spec:
  ingressClassName: nginx
  rules:
  - host: tower.home-cloud01.lab
    http:
      paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: awx-instance-serivce
              port:
                number: 30000
```

Step 2: Ensure Minikube has Nginx Ingress Classes

$ minikube addons enable ingress

Step 3: Deploy Ingress Nginx.

Run below command,

$ kubectl apply -f awx-nginx-ingress.yml

Above command will create below Ingress object

To see more details about our HTTP/HTTPS network routing, we shall be able to describe the object by running the following command.

$ kubectl describe ingress-nginx

As you can see on the above image, my specified subdomain tower.home-cloud01.lab was routed to the backend service - awx-nginx-service (the AWX service) on port 80.

Step 4: Modify hosts file

We will need to modify hosts file in our host server.

$ kubectl get ingress awx-nginx-ingress -n awx | grep -v NAME | awk -F' ' '{print $4 " " $3 }' | sudo tee -a /etc/hosts

Verify the host has been added into the /etc/hosts file

Step 5: Verify the connectivity.

So now we have the Ingress setup for our network routes. Let's test the connection.

$ curl -L -q http://tower.home-cloud01.lab/api/v2/ping 2>/dev/null

If you get the same response as per the following image, then you are in a good conditions.

Congratulations! Now you have the AWX up and runninng in your Kubernetes cluster.

Next we will explore on the Day 2 operations where we will access the AWX from the Web console.

~End of Lab 3 - Ingress Networking & Connectivity via Nginx~

PreviousLab 2 - AWX,AWX Operator Configurations & DeploymentsNextLab 4: AWX Web Console & accessibility on LAN

Last updated 1 year ago

Continue to Lab 4: AWX Web Console & accessibility on LAN
Once enable, we shall see nginx available in Ingress Classes
awx-nginx-ingress object created
More details can be seen when we describe the object
my /etc/hosts file
Ping response via the Ping API's