delonix net netns

Gestão de baixo nível da infra de ingress rootless.

Low-level management of the rootless ingress infrastructure.

A camada crua por baixo do ingress/egress: subir/descer o holder do ingress, attach/detach de netns, publish/unpublish de portas e firewall por container. A maioria dos utilizadores nunca precisa disto — usa os grupos de alto nível — mas está exposto para depuração e integração.

The raw layer underneath ingress/egress: bringing the ingress holder up/down, attaching/detaching netns, publishing/unpublishing ports and per-container firewalling. Most users never need this — they use the higher-level groups — but it's exposed for debugging and integration.

Usage: dlx net netns [OPTIONS] <COMMAND>

Commands:
  up         Bring the ingress infra up (idempotent): holder netns + delonix0 + single slirp
  status     Show the ingress infra status (holder/slirp pids, bridge, refcount)
  down       Force tear-down of the ingress infra (kills slirp + holder, frees the netns)
  attach     Attach a netns to delonix0 via veth (the holder is the netns/veth factory)
  detach     Detach (and destroy) a previously attached netns
  exec       Run a command inside an attached netns (exercises the runtime join path)
  publish    Publish a port through the ingress (add_hostfwd + DNAT) to a container
  unpublish  Unpublish a host port from the ingress
  firewall   Apply (or clear) a container's parameterizable firewall AT THE INGRESS
  help       Print this message or the help of the given subcommand(s)

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

netns firewall

Apply (or clear) a container's parameterizable firewall AT THE INGRESS

Usage: dlx net netns firewall [OPTIONS] <NAME>

Arguments:
  <NAME>  Netns/container name

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
      --spec <SPEC>   ContainerFw as JSON, e.g. `{"enabled":true,"policyIn":"deny","rules":[...]}`
      --clear         Remove the container's firewall from the ingress
  -h, --help          Print help

Exemplos

Aplicar a firewall de um container no ingress
delonix net netns firewall <id> 10.200.0.5

netns unpublish

Unpublish a host port from the ingress

Usage: dlx net netns unpublish [OPTIONS] <HOST_PORT>

Arguments:
  <HOST_PORT>  

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

Despublicar
delonix net netns unpublish 8080

netns publish

Publish a port through the ingress (add_hostfwd + DNAT) to a container

Usage: dlx net netns publish [OPTIONS] <NAME> <SPEC>

Arguments:
  <NAME>  Netns/container name (its IP is derived unless `--ip` is given)
  <SPEC>  Port mapping `hostPort:containerPort[/tcp|udp]`

Options:
      --ip <IP>       Override the container IP (defaults to the deterministic one from `name`)
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

Publicar uma porta pelo ingress, à mão
delonix net netns publish 8080:80 10.200.0.5

netns exec

Run a command inside an attached netns (exercises the runtime join path)

Usage: dlx net netns exec [OPTIONS] <NAME> <COMMAND>...

Arguments:
  <NAME>        
  <COMMAND>...  

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

Correr um comando DENTRO de uma netns anexada — para depurar a rede
delonix net netns exec minha-netns ip -br addr

netns detach

Detach (and destroy) a previously attached netns

Usage: dlx net netns detach [OPTIONS] <NAME>

Arguments:
  <NAME>  

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

Desligar e destruir essa netns
delonix net netns detach minha-netns

netns attach

Attach a netns to delonix0 via veth (the holder is the netns/veth factory)

Usage: dlx net netns attach [OPTIONS] <NAME>

Arguments:
  <NAME>  Netns name (typically a container id/short-id)

Options:
      --ip <IP>       IP in the infra subnet. Defaults to a deterministic one derived from `name`
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

Ligar uma netns à bridge (o motor faz isto sozinho no run)
delonix net netns attach minha-netns

netns down

Force tear-down of the ingress infra (kills slirp + holder, frees the netns)

Usage: dlx net netns down [OPTIONS]

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

Derrubar a infra de rede (mata slirp + holder) — derruba TODOS os containers da SDN
delonix net netns down

netns status

Show the ingress infra status (holder/slirp pids, bridge, refcount)

Usage: dlx net netns status [OPTIONS]

Options:
      --json          Emit JSON instead of a human summary
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

Estado da infra de ingress
delonix net netns status

netns up

Bring the ingress infra up (idempotent): holder netns + delonix0 + single slirp

Usage: dlx net netns up [OPTIONS]

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Exemplos

Subir o holder do ingress
delonix net netns up

LaboratórioLab

Olha para dentro da infra de rede rootless que a maioria dos utilizadores nunca precisa de tocar.

delonix net netns status
delonix net netns exec -- ip addr show delonix0

Look inside the rootless network infrastructure most users never need to touch.

delonix net netns status
delonix net netns exec -- ip addr show delonix0

DesafioChallenge

Desliga o holder com net netns down, depois corre QUALQUER container run — confirma que ele reaparece sozinho (ensure_up) e que net netns status volta a mostrar tudo saudável.

Bring the holder down with net netns down, then run ANY container run — confirm it comes back up by itself (ensure_up) and that net netns status reports everything healthy again.