I Have an application which is running on apache inside a kubernetes cluster
Application is running on port 8080 on apache and context is /tascaty_dev.
Below is the config file for the apache which is running inside the container :
Listen 8080
<VirtualHost *:8080>
WSGIDaemonProcess tascaty_dev python-path=/usr/local/lib/python3.8/dist-packages
<Location /tascaty_dev>
WSGIProcessGroup tascaty_dev
WSGIApplicationGroup %{GLOBAL}
</Location>
WSGIScriptAlias /tascaty_dev /usr/local/lib/python3.8/dist-packages/tascaty_project/wsgi.py
<Directory /usr/local/lib/python3.8/dist-packages/tascaty_project/>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Alias /static /usr/local/lib/python3.8/dist-packages/static
<Directory /usr/local/lib/python3.8/dist-packages/static>
Require all granted
</Directory>
</VirtualHost>
The pod is also exposed using a cluster ip service on port 8080
vagrant@kubemaster:~/apps/tascaty$ kubectl get pods -n tascaty
NAME READY STATUS RESTARTS AGE
tascatyk8s-deployment-865b5865dd-qb6zc 1/1 Running 0 15m
vagrant@kubemaster:~/apps/tascaty$ kubectl get services -n tascaty
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
tascatyk8s-cluster-ip-service ClusterIP 10.100.133.242 <none> 8080/TCP 2d
i have installed the ingress container using the bleow
kubectl apply -f
https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.34.1/deploy/static/provider/baremetal/deploy.yaml
Below is my ingress resource definition file
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: tascatyk8s-deployment-ingress
namespace: tascaty
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /tascaty_dev
backend:
serviceName: tascatyk8s-cluster-ip-service
servicePort: 8080
when try to access the application using the nginx ingress node port :
https://192.168.56.2:31150/tascaty_dev/ i get the apache home page instead of login screen of my application: