delonix pod

Pods reais multi-container (create, logs, exec, cp, attach) — N containers como uma unidade.

Real multi-container pods (create, logs, exec) — N containers as one unit.

Pods de verdade, ao estilo Kubernetes: N containers que partilham as namespaces do pod e se gerem como uma só unidade. Hoje partilham netns (o mesmo IP, alcançam-se por localhost), IPC (System V/POSIX) e UTS (o hostname). Tudo rootless e daemonless: o pod é uma netns SDN nomeada no holder (pod-<nome>, com IP na delonix0), e cada container junta-se a ela pelo re-exec nsenter … ip netns exec (a flag interna --pod); o 1.º container segura o IPC/UTS e os restantes fazem setns de /proc/<pid>/ns/{ipc,uts} — possível sem privilégio porque o re-exec já os põe no userns do holder. A membership não tem store novo: deriva do label delonix.io/pod=<nome> (como cluster/stack). Cria-se de um manifesto kind: Pod (o mesmo schema spec.containers[] do kind: Container, mas com N containers permitidos). Limitação conhecida: a namespace de PID (shareProcessNamespace, já no schema) ainda NÃO é partilhada — cada container mantém a sua própria árvore de processos; é a fatia seguinte.

Real Kubernetes-style pods: N containers that share the pod's namespaces and are managed as a single unit. Today they share netns (same IP, reachable via localhost), IPC (System V/POSIX) and UTS (the hostname). All of it rootless and daemonless: the pod is a named SDN netns on the holder (pod-<name>, with an IP on delonix0), and each container joins it through the nsenter … ip netns exec re-exec (the internal --pod flag); the first container holds the IPC/UTS namespaces and the rest setns into /proc/<pid>/ns/{ipc,uts} — possible without privilege because the re-exec already places them in the holder's userns. Membership needs no new store: it derives from the delonix.io/pod=<name> label (like cluster/stack). Created from a kind: Pod manifest (the same spec.containers[] schema as kind: Container, but with N containers allowed). Known limitation: the PID namespace (shareProcessNamespace, already in the schema) is NOT shared yet — each container keeps its own process tree; that's the next slice.

Usage: delonix pod [OPTIONS] <COMMAND>

Commands:
  create        Create a pod (N containers sharing a netns) from a manifest (`kind: Pod`)
  logs          Logs of a pod's container (defaults to the first member)
  attach        Re-attach to a pod member's output stream (output only)
  cp            Copy files between the host and one member of a pod
  exec          Execute a command inside one member of a pod (defaults to the first)
  port-forward  Forward one or more host ports to ports inside the pod's netns
  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 (see a summary with '-h')

COMMAND MAP:
  Lifecycle  create
  Inspect    logs
  Interact   exec · cp · attach · port-forward

EXAMPLES:
  # which pods exist and which containers each one holds
  delonix get pods

  # create one from a manifest — N containers on ONE IP, reaching each other
  # over localhost
  delonix pod create -f examples/pod-multi.yaml

  # the logs of a chosen member
  delonix pod logs web --container api

SEE ALSO:
  delonix pod create · delonix container run · delonix workload ls · delonix
  stack apply

  delonix › pod

ExemplosExamples

Listar os pods (POD, CONTAINERS n/N, IP, STATUS) — `pod ls` saiu na v2.0.0
List the pods (POD, CONTAINERS n/N, IP, STATUS) — `pod ls` went away in v2.0.0
delonix get pods
Detalhe de um pod, em blocos
Detail of one pod, in blocks
delonix describe pod web-app
Remover o pod como unidade
Remove the pod as a unit
delonix delete pod web-app

pod create

Create a pod (N containers sharing a netns) from a manifest (kind: Pod)

Usage: delonix pod create [OPTIONS]

Options:
  -f, --file <FILE>
          

      --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 (see a summary with '-h')

EXAMPLES:
  # N containers sharing one netns — same IP and `localhost` between them,
  # like a k8s Pod
  delonix pod create -f examples/pod-multi.yaml

  # from the default manifest in the current directory
  delonix pod create

SEE ALSO:
  delonix get · delonix describe · delonix stack apply

  delonix › pod › create

Idempotente (garante-presente): se o pod já tem containers, não faz nada. Também se pode aplicar pelo delonix stack apply (grupo pods: no kind: Stack) e pré-visualizar com --dry-run. Se a criação de um membro falha, o pod é desfeito por inteiro (sem meio-pod).

Idempotent (ensure-present): if the pod already has containers, it does nothing. Can also be applied via delonix stack apply (the pods: group in kind: Stack) and previewed with --dry-run. If creating one member fails, the whole pod is torn down (no half-pod).

ExemplosExamples

Criar um pod (web + sidecar que fala por localhost) de um manifesto
Create a pod (web + sidecar talking over localhost) from a manifest
delonix pod create -f examples/pod-multi.yaml

pod logs

Logs of a pod's container (defaults to the first member)

Usage: delonix pod logs [OPTIONS] <POD>

Arguments:
  <POD>
          

Options:
      --container <CONTAINER>
          Which container (its short name inside the pod). Default: the first

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

  -f, --follow
          

  -h, --help
          Print help (see a summary with '-h')

EXAMPLES:
  # the first member's logs, which is what you usually want
  delonix pod logs web

  # a specific container inside the pod, by its short name
  delonix pod logs web --container api

  # follow it live
  delonix pod logs -f web

SEE ALSO:
  delonix describe · delonix get · delonix container logs

  delonix › pod › logs

ExemplosExamples

Logs do 1.º container do pod
Logs from the pod's 1st container
delonix pod logs web-app
Logs de um container específico (nome curto dentro do pod)
Logs from a specific container (short name inside the pod)
delonix pod logs web-app --container sidecar -f

pod exec

Execute a command inside one member of a pod (defaults to the first)

Usage: delonix pod exec [OPTIONS] <POD> <COMMAND>...

Arguments:
  <POD>
          

  <COMMAND>...
          

Options:
  -i, --interactive
          Interactive (attaches stdin)

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

  -t, --tty
          Allocate a pseudo-terminal

  -e, --env <ENV>
          Extra environment variable (`KEY=VAL`) for this call only, on top of the container's own env. Repeatable

  -w, --workdir <WORKDIR>
          Working directory for this call only (default: the container's own configured `workdir`, or `/`)

  -u, --user <USER>
          Run as this user for this call only: `uid[:gid]` or `name[:group]` (resolved against the container's own `/etc/passwd`/`/etc/group`). Default: the container's own configured user

      --container <CONTAINER>
          Which container (its short name inside the pod). Default: the first

  -h, --help
          Print help (see a summary with '-h')

EXAMPLES:
  # run a command in the first member
  delonix pod exec web nginx -t

  # an interactive shell in a specific member
  delonix pod exec -it web --container sidecar sh

SEE ALSO:
  delonix pod attach · delonix pod cp · delonix container exec

  delonix › pod › exec

ExemplosExamples

Correr um comando no 1.º membro
delonix pod exec web-app nginx -t
Uma shell interactiva num membro específico
delonix pod exec -it web-app --container sidecar sh

pod cp

Copy files between the host and one member of a pod.

Exactly one side is pod:/path (e.g. delonix pod cp web:/etc/hosts .), same convention as container cp. Use --container when the pod has more than one member and the first isn't the one you mean.

Usage: delonix pod cp [OPTIONS] <SRC> <DST>

Arguments:
  <SRC>
          

  <DST>
          

Options:
      --container <CONTAINER>
          Which container (its short name inside the pod). Default: the first

      --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 (see a summary with '-h')

EXAMPLES:
  # out of the pod's first member onto the host
  delonix pod cp web:/etc/nginx/nginx.conf .

  # from the host into a specific member
  delonix pod cp ./site.conf web:/etc/nginx/conf.d/ --container sidecar

SEE ALSO:
  delonix pod exec · delonix container cp

  delonix › pod › cp

Exactamente um dos lados é pod:/caminho — a mesma convenção do container cp. Sem --container, resolve ao 1.º membro do pod.

ExemplosExamples

Do 1.º membro do pod para o host
delonix pod cp web-app:/etc/nginx/nginx.conf .
Do host para um membro específico
delonix pod cp ./site.conf web-app:/etc/nginx/conf.d/ --container sidecar

pod attach

Re-attach to a pod member's output stream (output only).

Same contract as container attach: this engine keeps no live stdin conduit to an already-started detached container, so -i/--interactive is refused with a clear error instead of silently doing nothing.

Usage: delonix pod attach [OPTIONS] <POD>

Arguments:
  <POD>
          

Options:
      --container <CONTAINER>
          Which container (its short name inside the pod). Default: the first

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

  -i, --interactive
          Refused: stdin forwarding isn't supported (see the command's own doc above)

  -h, --help
          Print help (see a summary with '-h')

EXAMPLES:
  # re-attach to the first member's output (output only)
  delonix pod attach web

SEE ALSO:
  delonix pod logs · delonix pod exec · delonix container attach

  delonix › pod › attach

Mesmo contrato do container attach: sem canal de stdin vivo para um container já desanexado, por isso -i é recusado com erro claro.

ExemplosExamples

Voltar a ligar-se à saída do 1.º membro (só saída)
delonix pod attach web-app

LaboratórioLab

Cria um pod de 2 containers e confirma que partilham IP — alcançam-se por localhost, como no Kubernetes. Um pod cria-se sempre a partir de um manifesto: os membros, as portas e os volumes não cabem em flags sem reinventar metade do kind: Pod.

cat > web-pod.yaml <<'YAML'
apiVersion: delonix.io/v1
kind: Pod
metadata: { name: web-pod }
spec:
  network: minha-rede
  containers:
    - { name: nginx, image: nginx:alpine }
    - { name: redis, image: redis:7-alpine }
YAML
delonix pod create -f web-pod.yaml
delonix describe pods web-pod
delonix pod logs web-pod

Create a 2-container pod and confirm they share an IP — reachable via localhost from each other, just like in Kubernetes. A pod is always created from a manifest: its members, ports and volumes do not fit in flags without reinventing half of kind: Pod.

cat > web-pod.yaml <<'YAML'
apiVersion: delonix.io/v1
kind: Pod
metadata: { name: web-pod }
spec:
  network: my-net
  containers:
    - { name: nginx, image: nginx:alpine }
    - { name: redis, image: redis:7-alpine }
YAML
delonix pod create -f web-pod.yaml
delonix describe pods web-pod
delonix pod logs web-pod

DesafioChallenge

Escreve o MESMO pod como um kind: Pod num manifesto e aplica-o com stack apply. Compara o describe pods resultante com o pod criado pela CLI — devem ter a mesma forma (netns/IPC/UTS partilhados).

Write the SAME pod as a kind: Pod in a manifest and apply it with stack apply. Compare the resulting describe pods against the CLI-created pod — they should look the same (shared netns/IPC/UTS).