kubectl logs

From wikieduonline
(Redirected from Klog)
Jump to navigation Jump to search

https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#logs

kubectl logs ${POD_NAME} ${CONTAINER_NAME}
kubectl logs job/your-cron-job-name
kubectl logs -f -n karpenter $(kubectl get pods -n karpenter -l karpenter=controller -o name)
kubectl logs -f -n karpenter -l app.kubernetes.io/name=karpenter -c controller


Labels:

kubectl logs
error: expected 'logs [-f] [-p] (POD | TYPE/NAME) [-c CONTAINER]'.
POD or TYPE/NAME is a required argument for the logs command
See 'kubectl logs -h' for help and examples

Related[edit]

See also[edit]

Advertising: