{"id":13522469,"url":"https://github.com/gerald1248/kubectl-match-name","last_synced_at":"2026-01-27T13:37:25.231Z","repository":{"id":45212931,"uuid":"169547164","full_name":"gerald1248/kubectl-match-name","owner":"gerald1248","description":"regex matching for resource names","archived":false,"fork":false,"pushed_at":"2021-12-31T09:35:25.000Z","size":19,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-02T06:14:09.160Z","etag":null,"topics":["kubectl","kubectl-plugins"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/gerald1248.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}},"created_at":"2019-02-07T09:28:07.000Z","updated_at":"2022-07-16T02:21:38.000Z","dependencies_parsed_at":"2022-09-24T19:40:18.443Z","dependency_job_id":null,"html_url":"https://github.com/gerald1248/kubectl-match-name","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerald1248%2Fkubectl-match-name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerald1248%2Fkubectl-match-name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerald1248%2Fkubectl-match-name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerald1248%2Fkubectl-match-name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gerald1248","download_url":"https://codeload.github.com/gerald1248/kubectl-match-name/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222683219,"owners_count":17022462,"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-plugins"],"created_at":"2024-08-01T06:00:47.648Z","updated_at":"2026-01-27T13:37:25.188Z","avatar_url":"https://github.com/gerald1248.png","language":"Go","funding_links":[],"categories":["kubectl Plugins"],"sub_categories":["Installing plugins via awesome-kubectl-plugins"],"readme":"kubectl-match-name\n==================\n\nAccess pods quickly without using the clipboard or listing all pods first. Here are some typical use cases:\n\n```\n$ kubectl logs `kubectl match-name proxy` -f\nI0207 12:51:25.322909       1 server.go:444] Version: v1.10.0\n...\n$ kubectl match-name proxy\nkube-proxy-cvtm5\n$ kubectl match-name -k svc .\ndefault-http-backend\n$ kubectl match-name minikube\netcd-minikube kube-addon-manager-minikube kube-apiserver-minikube kube-controller-manager-minikube kube-scheduler-minikube\n```\n\nLet's take a closer look at the first example. What have we gained? This line replaces two common approaches. In many cases we would use the clipboard or type in the hash component of the name:\n\n```\n$ kubectl get po | grep proxy\nkube-proxy-cf2df                            1/1     Running   0          5h\nkube-proxy-8dj6v                            1/1     Running   0          5h\nkube-proxy-s6wvq                            1/1     Running   0          5h\n$ kubectl logs kube-proxy-cf2df -f\n```\n\nWhat about a one-liner? It's straightforward but hardly concise:\n\n```\n$ kubectl logs `kubectl get po --no-headers | grep proxy | cut -d' ' -f1 | head -n1` -f\n```\n\nWhy not just a shell script? Mainly because it probably will not work as intended on Windows. It is hard to overestimate the number of Kubernetes users using `kubectl` via Git Bash or PowerShell.\n\nNote that although the binary itself is called `kubectl-match_name`, it is invoked by the command `kubectl match-name`.\n\n## Usage\n```\n$ kubectl match-name -h\nUsage: kubectl-match_name [-kubeconfig=PATH] [-a] [-k KIND] [-n NAMESPACE] REGEX\n  -A    match in all namespaces\n  -a    return all matching objects\n  -c    count matching objects (implies -a)\n  -k string\n        match objects of kind (default \"pod\")\n  -kubeconfig string\n        absolute path to the kubeconfig file\n  -n string\n        namespace\n```\n\nThe search expression is interpreted by the Golang `regexp` package (sadly not PCRE).\n\n## Run\nTo try the plugin on your computer, download one of the release binaries above (Linux, Mac, Windows).\n\n## Build\n```\n$ make\n$ sudo make install\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgerald1248%2Fkubectl-match-name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgerald1248%2Fkubectl-match-name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgerald1248%2Fkubectl-match-name/lists"}