Welcome to the Linux Foundation Forum!

Ingress controller: 11.2 getting this on both external and internal "503 Service Temporarily Unavai"

Hi Mr. @chrispokorni ,
I am having an error on both external and internal when using the below commands.
curl -H "Host: internal.org" http://10.97.192.168
curl -H "Host: www.external.com" http://10.97.192.168
I am unable to understand why it is not working kindly let me know about it if I am doing something wrong. I am sharing all my settings for exercise 11.2.

[email protected]:~$ kubectl get all
NAME                                           READY   STATUS    RESTARTS   AGE
pod/myingress-ingress-nginx-controller-n48j7   2/2     Running   0          32m
pod/myingress-ingress-nginx-controller-pvv6m   2/2     Running   0          33m

NAME                                                   TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
service/kubernetes                                     ClusterIP      10.96.0.1        <none>        443/TCP                      21d
service/myingress-ingress-nginx-controller             LoadBalancer   10.97.192.168    <pending>     80:30989/TCP,443:32137/TCP   37m
service/myingress-ingress-nginx-controller-admission   ClusterIP      10.104.133.123   <none>        443/TCP                      37m

NAME                                                DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR            AGE
daemonset.apps/myingress-ingress-nginx-controller   2         2         2       2            2           kubernetes.io/os=linux   37m

NAME                                         COMPLETIONS   DURATION   AGE
job.batch/my-ingress-nginx-admission-patch   0/1           49m        49m
[email protected]:~$ kubectl get svc
NAME                                           TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
kubernetes                                     ClusterIP      10.96.0.1        <none>        443/TCP                      21d
myingress-ingress-nginx-controller             LoadBalancer   10.97.192.168    <pending>     80:30989/TCP,443:32137/TCP   39m
myingress-ingress-nginx-controller-admission   ClusterIP      10.104.133.123   <none>        443/TCP                      39m

ingress.yaml:

[email protected]:~$ kubectl get ingress ingress-test -o yaml 
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
  creationTimestamp: "2022-06-13T18:59:03Z"
  generation: 4
  name: ingress-test
  namespace: default
  resourceVersion: "123512"
  uid: 832fb732-0a52-410b-bc81-7a5141b0e175
spec:
  rules:
  - host: internal.org
    http:
      paths:
      - backend:
          service:
            name: web-two
            port:
              number: 80
        path: /
        pathType: ImplementationSpecific
  - host: www.external.com
    http:
      paths:
      - backend:
          service:
            name: web-one
            port:
              number: 80
        path: /
        pathType: ImplementationSpecific
status:
  loadBalancer: {}

And one last thing how do they get into the web-two- container even in both 11.1 and 11.2 there is no such thing where we have to create a pod having the container name web-two. Please kindly clear this too.

Best Answer

  • chrispokorni
    chrispokorni Posts: 1,658
    Answer ✓

    Hi @alihasanahmedk,

    It seems you may have missed step 1 of lab exercise 11.2. It outlines the backend deployments and services targeted by the ingress.

    Regards,

    -Chris

Answers

Categories

Upcoming Training