{"id":13819567,"url":"https://github.com/nilic/kubectl-netshoot","last_synced_at":"2026-01-11T23:53:40.173Z","repository":{"id":65752757,"uuid":"582248058","full_name":"nilic/kubectl-netshoot","owner":"nilic","description":"kubectl plugin for spinning up netshoot container for network troubleshooting","archived":false,"fork":false,"pushed_at":"2023-04-23T20:07:26.000Z","size":46,"stargazers_count":159,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-19T18:49:15.385Z","etag":null,"topics":["kubectl","kubectl-plugin","kubectl-plugins","kubernetes","netshoot","troubleshooting"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nilic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"nilic","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-12-26T08:01:00.000Z","updated_at":"2024-11-18T19:44:08.000Z","dependencies_parsed_at":"2024-01-13T16:20:31.674Z","dependency_job_id":"72b90767-1804-41e4-bc82-33fce1f40e45","html_url":"https://github.com/nilic/kubectl-netshoot","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilic%2Fkubectl-netshoot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilic%2Fkubectl-netshoot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilic%2Fkubectl-netshoot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilic%2Fkubectl-netshoot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nilic","download_url":"https://codeload.github.com/nilic/kubectl-netshoot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254470303,"owners_count":22076566,"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":["kubectl","kubectl-plugin","kubectl-plugins","kubernetes","netshoot","troubleshooting"],"created_at":"2024-08-04T08:00:50.267Z","updated_at":"2026-01-11T23:53:40.168Z","avatar_url":"https://github.com/nilic.png","language":"Go","funding_links":["https://ko-fi.com/nilic"],"categories":["kubernetes"],"sub_categories":[],"readme":"# kubectl netshoot 🌠\nA [kubectl plugin](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) to easily spin up and access a [netshoot](https://github.com/nicolaka/netshoot) container. `netshoot` is a network troubleshooting Swiss-army knife which allows you to perform Kubernetes troubleshooting without installing any new packages in your containers or cluster nodes.\n\n## Installation\n\n### krew\n\nUsing [krew](https://krew.sigs.k8s.io/) kubectl plugin manager:\n\n```\n# add kubectl-netshoot plugin index\nkubectl krew index add netshoot https://github.com/nilic/kubectl-netshoot.git\n\n# install netshoot plugin\nkubectl krew install netshoot/netshoot\n```\n\n### Without krew\n\nJust download the binary for your OS and architecture from the [Releases](https://github.com/nilic/kubectl-netshoot/releases) page and place it in your `PATH`.\n\n## Usage\n\n```\nUsage:\n  kubectl netshoot [command]\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  debug       Debug using an ephemeral container in an existing pod or on a node\n  help        Help about any command\n  run         Run a throwaway pod for troubleshooting\n  version     Print kubectl-netshoot version\n\nFlags:\n  -h, --help                           help for kubectl-netshoot\n      --host-network                   (\"run\" command only) spin up netshoot on the node's network namespace\n      --image-name string              netshoot container image to use (default \"nicolaka/netshoot\")\n      --image-tag string               netshoot container image tag to use (default \"latest\")\n```\n\nIn addition to these flags, the following `kubectl` flags are available for all `kubectl netshoot` commands:\n\n```\nFlags:\n      --as string                      Username to impersonate for the operation. User could be a regular user or a service account in a namespace.\n      --as-group stringArray           Group to impersonate for the operation, this flag can be repeated to specify multiple groups.\n      --as-uid string                  UID to impersonate for the operation.\n      --cache-dir string               Default cache directory (default \"$HOME/.kube/cache\")\n      --certificate-authority string   Path to a cert file for the certificate authority\n      --client-certificate string      Path to a client certificate file for TLS\n      --client-key string              Path to a client key file for TLS\n      --cluster string                 The name of the kubeconfig cluster to use\n      --context string                 The name of the kubeconfig context to use\n      --disable-compression            If true, opt-out of response compression for all requests to the server\n      --insecure-skip-tls-verify       If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n      --kubeconfig string              Path to the kubeconfig file to use for CLI requests.\n      --match-server-version           Require server version to match client version\n  -n, --namespace string               If present, the namespace scope for this CLI request\n      --request-timeout string         The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default \"0\")\n  -s, --server string                  The address and port of the Kubernetes API server\n      --tls-server-name string         Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n      --token string                   Bearer token for authentication to the API server\n      --user string                    The name of the kubeconfig user to use\n```\n\n## Examples\n\n### Interactive session\n\nCommon use-case is to spin up a `netshoot` container with an interactive session and attach to it so you can perform troubleshooting using tools available in `netshoot`.\n\n`run` command is equivalent to `kubectl run --rm` meaning that the pod will be deleted after you exit the session.\n\n```\n# spin up a throwaway pod for troubleshooting\nkubectl netshoot run tmp-shell\n\n# spin up a throwaway pod with a specific netshoot image\nkubectl netshoot run tmp-shell --image-tag v0.5\n\n# spin up a throwaway pod on the node's network namespace\nkubectl netshoot run tmp-shell --host-network\n```\n\n`debug` command spins up netshoot as an [ephemeral container](https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/) in an existing pod or on a node. Ephemeral container terminates after the interactive session is exited.\n\n```\n# debug using an ephemeral container in an existing pod\nkubectl netshoot debug my-existing-pod\n\n# debug with a specific netshoot image\nkubectl netshoot debug my-existing-pod --image-tag v0.5\n\n# create a debug session on a node\nkubectl netshoot debug node/my-node\n```\n\nWhen running a debug session on a node, `netshoot` will run in the node's network namespace and have node's filesystem mounted at `/host`.\n\n### Running one-time commands\n\nInstead of attaching to the shell, you can also run a one-time command directly on the `netshoot` container. The command you want to run is specified after `--`: \n\n```\nkubectl netshoot run tmp-shell -- ping 8.8.8.8\n```\n\n```\nkubectl netshoot debug mypod -- curl localhost:8443\n```\n\n### Troubleshooting with a custom container\n\nBy default, plugin spins up `nicolaka/netshoot:latest` container image, but flags `--image-name` and `--image-tag` allow for running an arbitrary container, eg.\n\n```\nkubectl netshoot run tmp-shell --image-name busybox --image-tag 1.36.0\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilic%2Fkubectl-netshoot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilic%2Fkubectl-netshoot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilic%2Fkubectl-netshoot/lists"}