{"id":13521661,"url":"https://github.com/bmuschko/kubectl-swiftnp","last_synced_at":"2025-08-24T14:14:54.222Z","repository":{"id":64302570,"uuid":"191256829","full_name":"bmuschko/kubectl-swiftnp","owner":"bmuschko","description":"A kubectl plugin for rendering details of Network Policies.","archived":false,"fork":false,"pushed_at":"2019-06-13T21:37:04.000Z","size":30,"stargazers_count":12,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T07:34:51.002Z","etag":null,"topics":["golang","kubectl","kubectl-plugins","kubernetes"],"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/bmuschko.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2019-06-10T22:56:51.000Z","updated_at":"2025-02-02T03:22:59.000Z","dependencies_parsed_at":"2023-01-15T09:45:18.195Z","dependency_job_id":null,"html_url":"https://github.com/bmuschko/kubectl-swiftnp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bmuschko/kubectl-swiftnp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmuschko%2Fkubectl-swiftnp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmuschko%2Fkubectl-swiftnp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmuschko%2Fkubectl-swiftnp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmuschko%2Fkubectl-swiftnp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmuschko","download_url":"https://codeload.github.com/bmuschko/kubectl-swiftnp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmuschko%2Fkubectl-swiftnp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271884538,"owners_count":24838509,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["golang","kubectl","kubectl-plugins","kubernetes"],"created_at":"2024-08-01T06:00:36.858Z","updated_at":"2025-08-24T14:14:54.181Z","avatar_url":"https://github.com/bmuschko.png","language":"Go","funding_links":[],"categories":["kubectl Plugins"],"sub_categories":["Installing plugins via awesome-kubectl-plugins"],"readme":"= kubectl swiftnp image:https://circleci.com/gh/bmuschko/kubectl-swiftnp.svg?style=svg[\"CircleCI\", link=\"https://circleci.com/gh/bmuschko/kubectl-swiftnp\"] image:https://goreportcard.com/badge/github.com/bmuschko/kubectl-swiftnp[\"Go Report Card\", link=\"https://goreportcard.com/report/github.com/bmuschko/kubectl-swiftnp\"]\n\nkubectl plugin for rendering details of Network Policies\n\n== Intro\n\nListing all Network Policies in a Namespace provides little information about the Pods they apply to and the rules they specify.\nThe following command list all Network Policies describes as examples in the https://kubernetes.io/docs/concepts/services-networking/network-policies/[Kubernetes documentation].\n\n[source,bash]\n----\n$ kubectl get networkpolicy\nNAME                      POD-SELECTOR   AGE\nallow-all-egress          \u003cnone\u003e         17h\nallow-all-ingress         \u003cnone\u003e         17h\ndeny-all-egress           \u003cnone\u003e         17h\ndeny-all-ingress          \u003cnone\u003e         17h\ndeny-all-ingress-egress   \u003cnone\u003e         17h\ntest-network-policy       role=db        17h\n----\n\nAs you can see, it's extremely hard to grasp the effect of the Network Policies.\nYou'd usually have to have a look at the details of each Network Policy to understand their inner workings.\nThis is where this plugin comes in.\n\n== Usage\n\nRun the command `swiftnp` with the subcommand `list` to render detailed information about Network Policies.\nYou can render Network Policies in other Namespaces by providing the `--namespace` option.\n\n[source,bash]\n----\n$ kubectl swiftnp list\nNAME                   \tSELECTED-PODS  \tINGRESS-POLICY\tEGRESS-POLICY\tINGRESS-RULE\tEGRESS-RULE\tFROM-COUNT\tTO-COUNT\nallow-all-egress       \tfrontend, mypod\t✖            \t✔           \t✖              \t✔          \t0         \t0\nallow-all-ingress      \tfrontend, mypod\t✔            \t✖           \t✔              \t✖          \t0         \t0\ndeny-all-egress        \tfrontend, mypod\t✖            \t✔           \t✖              \t✖          \t0         \t0\ndeny-all-ingress       \tfrontend, mypod\t✔            \t✖           \t✖              \t✖          \t0         \t0\ndeny-all-ingress-egress\tfrontend, mypod\t✔            \t✔           \t✖              \t✖          \t0         \t0\ntest-network-policy    \tmypod          \t✔            \t✔           \t✔              \t✔          \t3         \t1\n----\n\nThe subcommand `version` renders the version of the released binary.\n\n[source,bash]\n----\n$ kubectl swiftnp version\nkubectl swiftnp v0.2.0\n----\n\n## Building the binary from source\n\nThe project requires Go 1.11 or higher as dependencies are defined with the help of Go Modules.\nFirst, activate Go Modules by setting the relevant environment variable.\nNext, create the platform-specific binary with the `build` command.\n\n[source,bash]\n----\n$ export GO111MODULES=on\n$ go build -o kubectl-swiftnp\n----\n\nBinaries for a wide range of other platforms can be created with the help of https://github.com/goreleaser/goreleaser[GoReleaser].\n\n[source,bash]\n----\n$ goreleaser release --skip-validate --snapshot --rm-dist\n----\n\nTo release a new version of the binaries to GitHub Releases, create a Git tag and remove the relevant flags in the command above.\n\n== Installation\n\nThe binary must be placed on the `$PATH` named `kubectl-swiftnp`. Ensure that the binary has execution permissions.\nFor more information, see the https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/[official documentation on kubectl plugins].","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmuschko%2Fkubectl-swiftnp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmuschko%2Fkubectl-swiftnp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmuschko%2Fkubectl-swiftnp/lists"}