Skip to content

hacks

Kubernetes

kail (logs viewer)

  • https://github.com/boz/kail
# tail-ΠΈΡ‚ Π»ΠΎΠ³ΠΈ ΠΊΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€ΠΎΠ² всСх ΠΏΠΎΠ΄ΠΎΠ² Π½Π° Ρ‚Π°ΠΊΠΎΠΉ Π½ΠΎΠ΄Π΅
kail --node ip-10-10-38-223.us-east-1b.compute.internal
# tail-ΠΈΡ‚ Π»ΠΎΠ³ΠΈ попавшиС Π² ΠΌΠ°Ρ‚Ρ‡Π΅Ρ€
kail -l app.kubernetes.io/name=traefik

asciicast

| --- | --- | | -l, --label LABEL-SELECTOR | match pods based on a standard label selector | | -p, --pod NAME | match pods by name | | -n, --ns NAMESPACE-NAME | match pods in the given namespace | | --svc NAME | match pods belonging to the given service | | --rc NAME | match pods belonging to the given replication controller | | --rs NAME | match pods belonging to the given replica set | | -d, --deploy NAME | match pods belonging to the given deployment | | --sts NAME | match pods belonging to the given statefulset | | -j, --job NAME | match pods belonging to the given job | | --node NODE-NAME | match pods running on the given node | | --ing NAME | match pods belonging to services targeted by the given ingress | | -c, --containers CONTAINER-NAME | restrict which containers logs are shown for | | --ignore LABEL-SELECTOR | Ignore pods that the selector matches. (default: kail.ignore=true) | | --current-ns | Match pods in the namespace specified in Kubernetes' "current context" | | --ignore-ns NAME | Ignore pods in the given namespaces. Overridden by --ns, --current-ns. (default: kube-system) |

Comments