Skip to content

一鍵調試kubernetes和docker容器的Web視覺化工具箱。A toolbox for debugging docker container and kubernetes with web UI.

License

Notifications You must be signed in to change notification settings

cloudnativer/kube-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A toolbox for debugging Docker container and Kubernetes with visual web UI. You can start the debugging journey on any docker container host! You can use kube-debug to debug the local host, the local container, any kubernetes node and any kubernetes pod of any namespace. It can help you to automatically complete the command line, and has a large number of visual debugging tools.

kube-debug

[1] Quick start


1.1 Download kube-debug package file


You can download the kube-debug-*.tgz package from https://github.com/cloudnativer/kube-debug/releases.

For example, we have downloaded the kube-debug-v0.1.0-x86.tgz package.

# cd ~/
# wget https://github.com/cloudnativer/kube-debug/releases/download/v0.1.0/kube-debug-v0.1.0-x86.tgz
# tar -zxvf kube-debug-x86-v0.1.0.tgz
# cd ~/kube-debug/

1.2 Initialize the kube-debug environment


Execute the following command to initialize the local debug environment:
# cd ~/kube-debug/
# ./kube-debug -init

1.3 Start debugging


You can use kube-debug to debug the local host, the local container, any kubernetes node and any kubernetes pod of any namespace.

For example, We can use kube-debug -localhost to debug the local host. Let's debug the local host , We can perform the following command operations:

# cd ~/kube-debug/
# ./kube-debug -localhost

After the command is executed, the following information will be displayed:

df02e84f5233e01309f3188d3ab5622df1c495d0c8b5f2c68247856d9c552625

Debug environment started successfully!

Notice: You can now enter the debugging interface in the following two ways:
        (1) Using a web browser to access http://Localhost's_IP:3080 Debug! (Recommended URL: http://192.168.1.12:3080)
        (2) Use the command to debug directly on the local host: docker exec -it kube-debug-localhost /bin/bash 

Now you can use a web browser to access http://192.168.1.12:3080 and enter the visual web ui for debugging.

kube-debug

 __________________
|  Web Browser UI  |
=============================================================================================================
=====| <- | -> | O |=====(  http://192.168.1.12:3080                                        )================
=============================================================================================================
|                                                                                                         | |
|  ##########################################################################################             | |
|                                                                                                         | | 
|    #    #   #     #   #####    ######         #####    ######  #####    #     #    #####                | |
|    #  #     #     #   #    #   #              #    #   #       #    #   #     #   #                     | |
|    ##       #     #   #####    ####    #####  #     #  ####    #####    #     #   #   ###               | |
|    #  #     #     #   #    #   #              #    #   #       #    #   #     #   #     #               | |
|    #    #    #####    #####    ######         #####    ######  #####     #####     ######               | |
|                                                                                                         | |
|    --------------------------------Powered By Cloudnativer-------------------------------               | |
|                                                                                                         | |
|  ##########################################################################################             | |
|  root@localhost:~ #                                                                                     |||
|  root@localhost:~ #                                                                                     |||
|  root@localhost:~ #                                                                                     |||
|  root@localhost:~ # iptraf-ng |                                                                         | |
=============================================================================================================

Here we can easily do visual debugging, Automatically complete the command line, Rich visual debugging tools:

kube-debug

In addition, we can also use the docker exec -it kube-debug-localhost /bin/bash command to directly log in to the debugging container for debugging.

[root@localhost ~]# docker exec -it kube-debug-localhost /bin/bash
##########################################################################################

  #    #   #     #   #####    ######         #####    ##