Skip to content

Commit

Permalink
Merge branch 'main' into fix-enode4-missing-quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandratran authored Feb 24, 2025
2 parents f367fb7 + 9771dfc commit 187be5e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 254 deletions.
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

0 comments on commit 187be5e

Please sign in to comment.