Hi Need help in Ingress resource Practice lab `root@controlplane:~# oc describe . . .

sudhi:
Hi Need help in Ingress resource Practice lab

root@controlplane:~# oc describe ingress app-ingress -n app-space
Name: app-ingress
Namespace: app-space
Address:
Default backend: default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
Host Path Backends
---- ---- --------
*
/wear wear-service:8080 (10.244.0.6:8080)
/watch video-service:8080 (10.244.0.5:8080)

sudhi:
https://legacy.kodekloud.com/courses/675080/lectures/12038779

R Banerjee:
whats the issue?

sudhi:
when i click ingress button and try to route to /wear nothing is displayed

sudhi:

sudhi:
same goes with /watch path

sudhi:
root@controlplane:~# oc get svc -n app-space
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default-http-backend ClusterIP 10.111.82.72 <none> 80/TCP 17m
video-service ClusterIP 10.109.146.52 <none> 8080/TCP 17m
wear-service ClusterIP 10.104.69.142 <none> 8080/TCP 17m

R Banerjee:
Describe looks ok to me…

sudhi:
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
name: app-ingress
namespace: app-space
annotations:
<http://nginx.ingress.kubernetes.io/rewrite-target|nginx.ingress.kubernetes.io/rewrite-target>: /
spec:
rules:
- http:
paths:
- path: /wear
pathType: Prefix
backend:
service:
name: wear-service
port:
number: 8080
- path: /watch
pathType: Prefix
backend:
service:
name: video-service
port:
number: 8080

sudhi:
this is the 3rd time doing this lab ,and i do get same result

R Banerjee:
Is the wear/watch pod working ?

You did connect the service to ingress, but if the service to pod connectivity is broken , for any reason, the result may not be displayed

sudhi:
root@controlplane:~# oc get po -n app-space
NAME READY STATUS RESTARTS AGE
default-backend-5cf9bfb9d-fgzqx 1/1 Running 0 27m
webapp-video-84f8655bd8-5wnw4 1/1 Running 0 27m
webapp-wear-6ff9445955-59q2t 1/1 Running 0 27m

sudhi:
root@controlplane:~# oc logs webapp-wear-6ff9445955-59q2t -n app-space
* Serving Flask app "app" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
* Running on <http://0.0.0.0:8080/> (Press CTRL+C to quit)
10.244.0.1 - - [28/Aug/2021 11:59:07] "GET / HTTP/1.1" 200 -

sudhi:
root@controlplane:~# oc logs webapp-video-84f8655bd8-5wnw4 -napp-space
* Serving Flask app "app" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
* Running on <http://0.0.0.0:8080/> (Press CTRL+C to quit)

R Banerjee:
BTW which question is this in the Ingress Test, let me check it out

sudhi:
okay ,its in <https://legacy.kodekloud.com/courses/675080/lectures/12038779|Practice Test - CKA - Ingress Networking - 2> , task 8

todoriri:
you should also have a service in app-space called ingress

apiVersion: v1
kind: Service
metadata:
  creationTimestamp: null
  name: ingress
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
    nodePort: 30080
  selector:
    name: nginx-ingress
  type: NodePort
status:
  loadBalancer: {} 

todoriri:
I think you have created default-http-backend instead

R Banerjee:
can you run kubectl get ingress -A ?

R Banerjee:
In this test, we created
• ingress-space namespace
• nginx-configuration configmap
• ingress-serviceaccount
• ingress-controller
• ingress nodeport service