Feedback

Chat Icon

End-to-End Kubernetes with Rancher, RKE2, K3s, Fleet, Longhorn, and NeuVector

The full journey from nothing to production

Deploying and Managing Services Using Rancher Manager - Part I
35%

A NodePort for the Deployment

The ClusterIP can be used when we want other applications inside the same cluster to access our application (like a frontend application accessing a backend application or a database). However, if we want to access the application from the outside world, we can use a NodePort. Even if this is not what we are going to keep, it's good to know how to create a NodePort Service using the Rancher UI.

Follow these steps:

  • First of all, make sure that your nodes have public IP addresses and that no firewall is blocking the traffic on the port we are going to use on each node. This is our case.
  • Click on Service Discovery and then Services.
  • Select NodePort as the type of Service.
  • Choose todo-app-namespace as the namespace.
  • Choose a name for the Service, for example, todo-app-nodeport.
  • In the Service Ports section, fill in the following details:
  • Name: http.
  • Listening Port: 5000.
  • Target Port: 5000.
  • Node Port: 30000.
  • In the Selector section, add the following labels:
  • app: todo-app.

Note that we can use any port number between 30000 and 32767 for the Node Port

End-to-End Kubernetes with Rancher, RKE2, K3s, Fleet, Longhorn, and NeuVector

The full journey from nothing to production

Enroll now to unlock all content and receive all future updates for free.