Welcome to the Linux Foundation Forum!

11.2 Connection refused

Posts: 5
edited June 2023 in LFS258 Class Forum

Hi all,

When working through the labs 11.2 I was unable to curl the 404 from the nginx pods, I always got "connection refused".

Changing the following values additionally to those mentioned in instruction #4 will allow the ingress controler to use the host ports allowing for a connection from inside the local network.

  1. hostPort:
  2. # -- Enable 'hostPort' or not
  3. enabled: true <---- change to true
  4. ports:
  5. # -- 'hostPort' http port
  6. http: 80
  7. # -- 'hostPort' https port
  8. https: 443

If you have already installed the helm chart and are troubleshooting the error you can change the value in the values.yaml file and upgrade the helm chart:

  1. hlm upgrade myingress .

Your output should look something like this:

  1. Release "myingress" has been upgraded. Happy Helming!
  2. NAME: myingress
  3. LAST DEPLOYED: Sat Jun 17 16:22:33 2023
  4. NAMESPACE: default
  5. STATUS: deployed
  6. **REVISION: 2**
  7. TEST SUITE: None
  8. NOTES:
  9. The ingress-nginx controller has been installed.
  10. It may take a few minutes for the LoadBalancer IP to be available.
  11. You can watch the status by running 'kubectl --namespace default get services -o wide -w myingress-ingress-nginx-controller'
  12.  
  13. An example Ingress that makes use of the controller:
  14. apiVersion: networking.k8s.io/v1
  15. kind: Ingress
  16. metadata:
  17. name: example
  18. namespace: foo
  19. spec:
  20. ingressClassName: nginx
  21. rules:
  22. - host: www.example.com
  23. http:
  24. paths:
  25. - pathType: Prefix
  26. backend:
  27. service:
  28. name: exampleService
  29. port:
  30. number: 80
  31. path: /
  32. # This section is only required if TLS is to be enabled for the Ingress
  33. tls:
  34. - hosts:
  35. - www.example.com
  36. secretName: example-tls
  37.  
  38. If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:
  39.  
  40. apiVersion: v1
  41. kind: Secret
  42. metadata:
  43. name: example-tls
  44. namespace: foo
  45. data:
  46. tls.crt: <base64 encoded cert>
  47. tls.key: <base64 encoded key>
  48. type: kubernetes.io/tls

Addtionally
If you have not allowed pods to be secdualed on your cp please curl the server where the pods are running on (your worker node).

Hope this helps someone save time. :)

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training