Difference between revisions of "Kubectl debug"
Jump to navigation
Jump to search
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
{{lc}} | {{lc}} | ||
+ | <code>[[kubectl]] debug</code> (since [[v1.18]], March 2020) | ||
− | + | kubectl debug -it <pod-name> --image=busybox --target=<target-container> | |
+ | kubectl debug -it <pod-name> --image=busybox --target=<target-container> -- [[sh --user]] root | ||
+ | * https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container-example | ||
+ | |||
+ | [[kubectl debug]] -it ephemeral-demo --image=[[busybox]] [[--target]]=ephemeral-demo | ||
+ | |||
+ | [[kubectl debug]] -it ephemeral-demo --image=[[ubuntu]] [[--target]]=ephemeral-demo | ||
+ | |||
+ | |||
+ | == Activities == | ||
+ | * [[Kubernetes debugging with an ephemeral debug container]]: <code>[[kubectl]] debug</code> | ||
== Related == | == Related == |
Latest revision as of 12:43, 24 October 2024
kubectl debug
(since v1.18, March 2020)
kubectl debug -it <pod-name> --image=busybox --target=<target-container> kubectl debug -it <pod-name> --image=busybox --target=<target-container> -- sh --user root
kubectl debug -it ephemeral-demo --image=busybox --target=ephemeral-demo
kubectl debug -it ephemeral-demo --image=ubuntu --target=ephemeral-demo
Activities[edit]
Related[edit]
See also[edit]
- K8s troubleshooting:
kubectl logs, kubectl top, kubectl get events -A, kubectl describe pod
, Liveness, Readiness,Kubernetes events
, Pulling image, OOMKilled, ProbeWarning, Reason,FailedScheduling
,errImagePull, ImagePullBackOff
, Kubelet conditions:MemoryPressure, DiskPressure, KubeletHasSufficientPID, KubeletReady, kubectl [ debug | attach | exec ] kubectl cluster-info dump, SimKube, KWOK
Advertising: