{"id":28578199,"url":"https://github.com/digitalocean/doks-debug","last_synced_at":"2025-06-11T01:09:10.940Z","repository":{"id":41158225,"uuid":"186600075","full_name":"digitalocean/doks-debug","owner":"digitalocean","description":"A Docker image with Kubernetes manifests for investigation and troubleshooting.","archived":false,"fork":false,"pushed_at":"2025-04-08T10:12:14.000Z","size":2735,"stargazers_count":150,"open_issues_count":3,"forks_count":31,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-04-08T10:34:37.475Z","etag":null,"topics":["debug","hacktoberfest","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitalocean.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-14T10:30:00.000Z","updated_at":"2025-04-08T10:12:16.000Z","dependencies_parsed_at":"2024-04-30T09:32:33.356Z","dependency_job_id":"d6470957-9d9e-464e-926e-f4ec9dacbcad","html_url":"https://github.com/digitalocean/doks-debug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdoks-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdoks-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdoks-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdoks-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalocean","download_url":"https://codeload.github.com/digitalocean/doks-debug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdoks-debug/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259178519,"owners_count":22817388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debug","hacktoberfest","kubernetes"],"created_at":"2025-06-11T01:09:10.171Z","updated_at":"2025-06-11T01:09:10.930Z","avatar_url":"https://github.com/digitalocean.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Docker image with Kubernetes manifests for investigation and troubleshooting your cluster.\n\n![main build](https://github.com/digitalocean/doks-debug/actions/workflows/test.yaml/badge.svg) ![main release](https://github.com/digitalocean/doks-debug/actions/workflows/release.yaml/badge.svg)\n\n# Purpose\n\nThe DOKS team provides this image for use as-is and for transparency as the image used when a request to \"deploy a debug pod\" is made to our customers, which may occur when deeper investigation is needed with direct access to a cluster.\n\n# Usage\n\n```bash\nkubectl apply -f k8s/daemonset.yaml\n```\n\nThis DaemonSet manifest will:\n\n 1. Ensure a pod with our Docker image is running indefinitely on every node.\n 2. Use `hostPID`, `hostIPC`, and `hostNetwork`.\n 3. Mount the entire host filesystem to `/host` in the containers.\n 4. Mount the `containerd` socket at `/run/containerd/containerd.sock` from the host into the container.\n\nIn order to make use of these workloads, you can exec into a pod of choice by name:\n\n```bash\nkubectl -n kube-system exec -it my-pod-name bash\n```\n\nIf you know the specific node name that you're interested in, you can exec into the debug pod on that node with:\n\n```bash\nNODE_NAME=\"my-node-name\"\nPOD_NAME=$(kubectl -n kube-system get pods --field-selector spec.nodeName=${NODE_NAME} -ojsonpath='{.items[0].metadata.name}')\nkubectl -n kube-system exec -it ${POD_NAME} bash\n```\n\nOnce you're in, you have access to the set of tools listed in the `Dockerfile`. This includes:\n\n - [`vim`](https://github.com/vim/vim) - is a greatly improved version of the good old UNIX editor Vi. \n - [`screen`](https://www.gnu.org/software/screen/) - is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.\n - [`curl`](https://github.com/curl/curl) - is a command-line tool for transferring data specified with URL syntax.\n - [`jq`](https://github.com/stedolan/jq) - is a lightweight and flexible command-line JSON processor.\n - [`dnsutils`](https://packages.debian.org/stretch/dnsutils) - includes various client programs related to DNS that are derived from the BIND source tree, specifically [`dig`](https://linux.die.net/man/1/dig), [`nslookup`](https://linux.die.net/man/1/nslookup), and [`nsupdate`](https://linux.die.net/man/8/nsupdate).\n - [`iputils-ping`](https://packages.debian.org/stretch/iputils-ping) - includes the [`ping`](https://linux.die.net/man/8/ping) tool that sends ICMP `ECHO_REQUEST` packets to a host in order to test if the host is reachable via the network.\n - [`tcpdump`](https://www.tcpdump.org/) - a powerful command-line packet analyzer; and libpcap, a portable C/C++ library for network traffic capture.\n - [`traceroute`](https://linux.die.net/man/8/traceroute) - tracks the route packets taken from an IP network on their way to a given host.\n - [`net-tools`](https://packages.debian.org/stretch/net-tools) - includes the important tools for controlling the network subsystem of the Linux kernel, specifically [`arp`](http://man7.org/linux/man-pages/man8/arp.8.html), [`ifconfig`](https://linux.die.net/man/8/ifconfig), and [`netstat`](https://linux.die.net/man/8/netstat).\n - [`netcat`](https://linux.die.net/man/1/nc) - is a multi-tool for interacting with TCP and UDP; it can open TCP connections, send UDP packets, listen on arbitrary TCP and UDP ports, do port scanning, and deal with both IPv4 and IPv6.\n - [`iproute2`](https://wiki.linuxfoundation.org/networking/iproute2) - is a collection of utilities for controlling TCP / IP networking and traffic control in Linux.\n - [`strace`](https://github.com/strace/strace) - is a diagnostic, debugging and instructional userspace utility with a traditional command-line interface for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state.\n - [`dstat`](http://dag.wiee.rs/home-made/dstat/) - is a versatile replacement for vmstat, iostat, netstat and ifstat. Dstat overcomes some of their limitations and adds some extra features, more counters and flexibility. Dstat is handy for monitoring systems during performance tuning tests, benchmarks or troubleshooting.\n - [`htop`](https://hisham.hm/htop/) - is interactive process viewer for Unix systems.\n - [`atop`](https://www.atoptool.nl/) - is an advanced interactive monitor for Linux-systems to view the load on system-level and process-level.\n - [`wget`](https://www.gnu.org/software/wget/) - for retrieving files using HTTP, HTTPS, FTP and FTPS.\n - [`crictl`](https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md) - A CLI for CRI endpoints. Configured to use `/run/containerd/containerd.sock` as a default endpoint. \n# Tips and Tricks\n\n## chroot + systemctl\n\n```bash\nchroot /host /bin/bash\nsystemctl status kubelet\njournalctl -xe\njournalctl -u kubelet\n```\n\n# Contributing\n\n At DigitalOcean we value and love our community! If you have any issues or would like to contribute, feel free to open an issue or PR and cc any of the maintainers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fdoks-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalocean%2Fdoks-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fdoks-debug/lists"}