Welcome to the Linux Foundation Forum!

Lab6.4: NodePort not found on nodes

Hi there ... I'm struggling to verify the following:

"Both of your nodes should be exposing the web server on port 32000."

control-plane:

lars@cp:~$  sudo lsof -Pni TCP@0.0.0.0:32000
lars@cp:~$

worker:

lars@worker:~$ sudo lsof -Pni TCP@0.0.0.0:32000
lars@worker:~$

From my dev-laptop tcp-port 32000 is available on both nodes though (example for control-plane node):

lars@cp:~$ curl ifconfig.io
34.79.160.208
 Ubuntu-22.04  lars  RDDE1DC7  ~  src  lars.juetten  k8s_training  main  10✎  16? 
 10:20:24  $  curl http://34.79.160.208:32000
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
...

Now I wonder ... does anybody have some advise?

Answers

  • chrispokorni
    chrispokorni Posts: 2,376

    Hi @juetten,

    If you can successfully hit the same NodePort (32000) on any one of the cluster nodes, from any other node or the public internet (assuming firewall rules allows inbound traffic on the desired NodePort), then the NodePort service type is correctly configured.

    However, typical networking troubleshooting tools may not return the port number as being in use.

    Regards,
    -Chris

Categories

Upcoming Training