Skip to content

Configurable ports when service type is NodePort#788

Merged
pinheadmz merged 4 commits intobitcoin-dev-project:mainfrom
Jhoyola:configurable-nodeports
Apr 21, 2026
Merged

Configurable ports when service type is NodePort#788
pinheadmz merged 4 commits intobitcoin-dev-project:mainfrom
Jhoyola:configurable-nodeports

Conversation

@Jhoyola
Copy link
Copy Markdown
Contributor

@Jhoyola Jhoyola commented Feb 17, 2026

For a simple and static way to connect to the node RPCs from host machine, the service type can be set to "NodePort". This PR makes it possible to fix static ports for each node to preconfigure a development environment based on warnet.

@pinheadmz
Copy link
Copy Markdown
Contributor

I think mechanically this is the right choice to get remote access to each pod individually. It seems more correct and kubernetes-y than #686 which addresses the same goal.

Questions:

  • How does the local user get the IP:port of the pod they want to connect to?
  • How does this work in a large scale cluster with multiple kubernetes nodes, multiple pods on each node?

@Jhoyola
Copy link
Copy Markdown
Contributor Author

Jhoyola commented Feb 18, 2026

  • How does the local user get the IP:port of the pod they want to connect to?

User would add the below to the node on their network configuration. Then it's accessible at localhost:30443. I added documentation about this. Also added a small section about kubectl port-forward similar to #686 but without a warnet command.

    service:
      type: NodePort
      rpcNodePort: 30443
  • How does this work in a large scale cluster with multiple kubernetes nodes, multiple pods on each node?

Haven't tested it, but according to Kubernetes docs it works just as: <kubernetes-node-ip>:<exposed-port>

@Jhoyola Jhoyola force-pushed the configurable-nodeports branch from 5649bd2 to 31739bc Compare February 27, 2026 17:06
@Jhoyola
Copy link
Copy Markdown
Contributor Author

Jhoyola commented Feb 27, 2026

Rebased

@pinheadmz pinheadmz force-pushed the configurable-nodeports branch from 31739bc to 6676377 Compare April 20, 2026 14:32
Copilot AI review requested due to automatic review settings April 20, 2026 14:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@pinheadmz
Copy link
Copy Markdown
Contributor

pinheadmz commented Apr 20, 2026

Sorry about the long delay. Rebased on main mainly to refresh CI. WIll review today.

@pinheadmz
Copy link
Copy Markdown
Contributor

fixed a nit in the doc and added a test

@pinheadmz
Copy link
Copy Markdown
Contributor

pinheadmz commented Apr 20, 2026

adding new command warnet host which can be used to get the cluster node IP or hostname (including minikube) for use with NodePort

@pinheadmz pinheadmz force-pushed the configurable-nodeports branch 5 times, most recently from 1a8b9e5 to 01aca69 Compare April 20, 2026 19:39
@pinheadmz pinheadmz force-pushed the configurable-nodeports branch from 01aca69 to 7a9e6d0 Compare April 21, 2026 01:15
@pinheadmz
Copy link
Copy Markdown
Contributor

Tested locally with macos using Docker Desktop and Minikube backends. Ran a remote cluster on digital ocean and tested that setup from debian. Along with the CI which runs ubuntu and Minikube, I think this is working as well as expected.

The tricky part was warnet host -- determining where to connect to those NodePorts on all platforms. Especially on macos, where kubernetes is run inside a VM with IP addresses normally inaccessible to the host.

Unfortunately there is no good way to test the feature on Macos using minkube backend, so I programmed the test to just skip if that is the condition

@pinheadmz
Copy link
Copy Markdown
Contributor

@Jhoyola I think this is ready to merge, do you wanna take one last look and make sure I didn't break anything you need?

@Jhoyola
Copy link
Copy Markdown
Contributor Author

Jhoyola commented Apr 21, 2026

Looks good to me. Thanks!

@pinheadmz pinheadmz merged commit fbf31d1 into bitcoin-dev-project:main Apr 21, 2026
45 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants