delonix pod
Pods reais multi-container (create, ls, describe, rm, logs) — N containers como uma unidade.
Real multi-container pods (create, ls, describe, rm, logs) — 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.
📄 Implementação real em Rust: cmd/pod.rs
Usage: dlx pod [OPTIONS] <COMMAND>
Commands:
create Create a pod (N containers sharing a netns) from a manifest (`kind: Pod`)
ls List the pods (derived from container labels)
describe Details of one or more pods (containers + the shared IP), `kubectl` style
rm Remove a pod: stop/remove ALL its containers + the shared netns
logs Logs of a pod's container (defaults to the first member)
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 helppod create
Create a pod (N containers sharing a netns) from a manifest (kind: Pod)
Usage: dlx 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 helpIdempotente (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).
Exemplos
delonix pod create -f examples/pod-multi.yamlpod ls
List the pods (derived from container labels)
Usage: dlx pod ls [OPTIONS]
Options:
--l18n <en|pt> Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
-o, --output <OUTPUT> Output format: `table` (default) or `json` (ADR-0005) [default: table] [possible values: table, json]
-h, --help Print helpExemplos
delonix pod lspod describe
Details of one or more pods (containers + the shared IP), kubectl style
Usage: dlx pod describe [OPTIONS] [NAMES]...
Arguments:
[NAMES]...
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 helpExemplos
delonix pod describe web-apppod rm
Remove a pod: stop/remove ALL its containers + the shared netns
Usage: dlx pod rm [OPTIONS] [NAMES]...
Arguments:
[NAMES]...
Options:
-f, --force Force (kill) running containers
--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 helpExemplos
delonix pod rm web-appdelonix pod rm -f web-apppod logs
Logs of a pod's container (defaults to the first member)
Usage: dlx 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 helpExemplos
delonix pod logs web-appdelonix pod logs web-app --container sidecar -fLaboratórioLab
Cria um pod de 2 containers e confirma que partilham IP —
alcançam-se por localhost, como no Kubernetes.
delonix pod create web-pod --container nginx --container redis
delonix pod describe web-pod
delonix pod logs web-podCreate a 2-container pod and confirm they share an IP — reachable via
localhost from each other, just like in Kubernetes.
delonix pod create web-pod --container nginx --container redis
delonix pod describe web-pod
delonix pod logs web-podDesafioChallenge
Escreve o MESMO pod como um kind: Pod num
manifesto e aplica-o com stack apply. Compara o pod describe 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 pod describe against the
CLI-created pod — they should look the same (shared netns/IPC/UTS).