"Kubectl debug"의 두 판 사이의 차이

(새 문서: ==개요== {{소문자}} ;kubectl debug <syntaxhighlight lang='console'> root@localhost:~# kubectl get no NAME STATUS ROLES AGE VERSION cluster1-node...)
 
 
(같은 사용자의 중간 판 7개는 보이지 않습니다)
5번째 줄: 5번째 줄:
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
root@localhost:~# kubectl get no
root@localhost:~# kubectl get no
NAME                           STATUS  ROLES    AGE  VERSION
NAME                               STATUS  ROLES    AGE  VERSION
cluster1-node1-765bcd43-ef2h  Ready    <none>  12d  v1.20.15
cluster1-nodepool1-765bcd43-ef2h  Ready    <none>  12d  v1.20.15
root@localhost:~# kubectl debug node/cluster1-node1-765bcd43-ef2h -it --image=busybox
</syntaxhighlight>
Creating debugging pod node-debugger-cluster1-node1-765bcd43-ef2h with container debugger on node cluster1-node1-765bcd43-ef2h.
<syntaxhighlight lang='console'>
root@localhost:~# kubectl debug node/cluster1-nodepool1-765bcd43-ef2h -it --image=busybox
Creating debugging pod node-debugger-cluster1-nodepool1-765bcd43-ef2h-z7vj2 with container debugger on node cluster1-node1-765bcd43-ef2h.
If you don't see a command prompt, try pressing enter.
If you don't see a command prompt, try pressing enter.
</syntaxhighlight>
<syntaxhighlight lang='console'>
/ # hostname
/ # hostname
cluster1-node1-765bcd43-ef2h
cluster1-nodepool1-765bcd43-ef2h
/ # ps -ocomm | grep kube
</syntaxhighlight>
kubelet
<syntaxhighlight lang='console'>
kube-proxy
/ # ps -opid,comm | grep kube
1734 kubelet
2372 kube-proxy
</syntaxhighlight>
<syntaxhighlight lang='console'>
/ # exit
root@localhost:~# kubectl get pod | grep node-debugger
node-debugger-cluster1-nodepool1-765bcd43-ef2h-z7vj2  0/1    Completed  0          90s
</syntaxhighlight>
<syntaxhighlight lang='console'>
root@localhost:~# kubectl delete pod node-debugger-cluster1-nodepool1-765bcd43-ef2h-z7vj2
pod "node-debugger-cluster1-nodepool1-765bcd43-ef2h-z7vj2" deleted
</syntaxhighlight>
</syntaxhighlight>


==같이 보기==
==같이 보기==
{{z컬럼3|
* [[kubectl exec]]
* [[kubectl exec]]
* [[kubectl get no]]
* [[kubectl get pod]]
* [[kubectl delete pod]]
* [[error: ephemeral containers are disabled for this cluster]]
}}


==참고==
==참고==

2023년 6월 1일 (목) 19:43 기준 최신판

1 개요[ | ]

kubectl debug
root@localhost:~# kubectl get no
NAME                               STATUS   ROLES    AGE   VERSION
cluster1-nodepool1-765bcd43-ef2h   Ready    <none>   12d   v1.20.15
root@localhost:~# kubectl debug node/cluster1-nodepool1-765bcd43-ef2h -it --image=busybox
Creating debugging pod node-debugger-cluster1-nodepool1-765bcd43-ef2h-z7vj2 with container debugger on node cluster1-node1-765bcd43-ef2h.
If you don't see a command prompt, try pressing enter.
/ # hostname
cluster1-nodepool1-765bcd43-ef2h
/ # ps -opid,comm | grep kube
 1734 kubelet
 2372 kube-proxy
/ # exit
root@localhost:~# kubectl get pod | grep node-debugger
node-debugger-cluster1-nodepool1-765bcd43-ef2h-z7vj2   0/1     Completed   0          90s
root@localhost:~# kubectl delete pod node-debugger-cluster1-nodepool1-765bcd43-ef2h-z7vj2
pod "node-debugger-cluster1-nodepool1-765bcd43-ef2h-z7vj2" deleted

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}