Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove K8s NAT method #1778

Merged
merged 6 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 0 additions & 230 deletions docs/private-networks/tutorials/kubernetes/nat-manager.md

This file was deleted.

27 changes: 4 additions & 23 deletions docs/public-networks/how-to/connect/specify-nat.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags:

# Specify the NAT method

Use the [`--nat-method`](../../reference/cli/options.md#nat-method) option to specify the NAT method. Options are: [`UPNP`](#upnp), [`KUBERNETES`](#kubernetes), [`DOCKER`](#docker), [`AUTO`](#auto), and [`NONE`](#none).
Use the [`--nat-method`](../../reference/cli/options.md#nat-method) option to specify the NAT method. Options are: [`UPNP`](#upnp), [`DOCKER`](#docker), [`AUTO`](#auto), and [`NONE`](#none).

The [enode](../../concepts/node-keys.md#enode-url) advertised to other nodes during discovery is the external IP address and port. The [`admin_nodeInfo`](../../reference/api/index.md#admin_nodeinfo) JSON-RPC API method returns the external address and port for the `enode` and `listenAddr` properties.

Expand All @@ -20,23 +20,12 @@ While Besu is running, the following are not supported:

## Auto

`AUTO` detects if Besu is running inside a Kubernetes cluster or a Docker container.

- If Besu is running in a Kubernetes cluster, `AUTO` sets to [`KUBERNETES`](#kubernetes).
- If Besu is running in a Docker container, `AUTO` sets to [`DOCKER`](#docker).
- If Besu is not running in Kubernetes or Docker container, `AUTO` sets to [`NONE`](#none).
`AUTO` detects if Besu is running inside a Docker container.
If Besu is running in a Docker container, `AUTO` sets to [`DOCKER`](#docker).
If Besu is not running in a Docker container, `AUTO` sets to [`NONE`](#none).

`AUTO` is the default NAT method.

The following log shows an automatic detection failure.

```log title="The following log shows an automatic detection failure"
INFO | KubernetesNatManager | Starting kubernetes NAT manager.
DEBUG | KubernetesNatManager | Trying to update information using Kubernetes client SDK.
DEBUG | NatService | Nat manager failed to configure itself automatically due to the following reason Service not found. NONE mode will be used
INFO | NetworkRunner | Starting Network.
```

:::tip

If automatic detection fails, set the IP and ports in [`NONE`](#none) mode.
Expand All @@ -63,14 +52,6 @@ When the NAT method is set to `UPNP`, the advertised port is the same as the [li

:::

## Kubernetes

Specify `KUBERNETES` to explicitly specify Besu is running inside a Kubernetes cluster. Besu automatically detects if it's running inside of a Kubernetes cluster and interacts with Kubernetes APIs as required to determine external IP addresses and exposed ports.

In Kubernetes, the Ingress IP of the load balancer will be used as the external IP for Besu. A load balancer service can map any incoming port to a target port. These mapping rules will be the one retrieved by Besu.

A tutorial to [Configure the Nat Manager for Kubernetes](../../../private-networks/tutorials/kubernetes/nat-manager.md) is available.

## Docker

Specify `DOCKER` to explicitly specify Besu is running inside a Docker container. If you specify `DOCKER`, you advertise the host IP address not the container IP address.
Expand Down
1 change: 0 additions & 1 deletion docs/public-networks/reference/cli/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -2569,7 +2569,6 @@ Specify the method for handling [NAT environments](../../how-to/connect/specify-

- [`UPNP`](../../how-to/connect/specify-nat.md#upnp)
- [`UPNPP2PONLY`](../../how-to/connect/specify-nat.md#upnp)
- [`KUBERNETES` (Deprecated)](../../how-to/connect/specify-nat.md#kubernetes)
- [`DOCKER`](../../how-to/connect/specify-nat.md#docker)
- [`AUTO`](../../how-to/connect/specify-nat.md#auto)
- [`NONE`](../../how-to/connect/specify-nat.md#none).
Expand Down
4 changes: 4 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ const config = {
from: "/private-networks/tutorials/permissioning/upgrade-contracts",
to: "/private-networks/how-to/use-permissioning/onchain",
},
{
from: "/private-networks/tutorials/kubernetes/nat-manager",
to: "/private-networks/tutorials/kubernetes",
}
],
createRedirects(existingPath) {
if (existingPath.includes("/development")) {
Expand Down
Loading