Difference between revisions of "Kubectl debug"

From wikieduonline
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
<code>[[kubectl]] debug</code> (since [[v1.18]], March 2020)
 
<code>[[kubectl]] debug</code> (since [[v1.18]], March 2020)
  
   [[kubectl debug]] -it ephemeral-demo --image=[[busybox]]:1.28 [[--target]]=ephemeral-demo
+
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
  
  

Latest revision as of 12:43, 24 October 2024

Advertising: