{"id":13522555,"url":"https://github.com/similarweb/kubectl-ipick","last_synced_at":"2025-04-05T10:30:52.416Z","repository":{"id":53825050,"uuid":"276022895","full_name":"similarweb/kubectl-ipick","owner":"similarweb","description":"Interactive plugin for kubectl","archived":false,"fork":false,"pushed_at":"2020-07-15T17:55:32.000Z","size":3027,"stargazers_count":31,"open_issues_count":5,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-21T02:51:16.572Z","etag":null,"topics":[],"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/similarweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-30T06:59:59.000Z","updated_at":"2025-01-17T18:12:08.000Z","dependencies_parsed_at":"2022-09-26T18:22:07.232Z","dependency_job_id":null,"html_url":"https://github.com/similarweb/kubectl-ipick","commit_stats":null,"previous_names":["similarweb/kubectl-interactive"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/similarweb%2Fkubectl-ipick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/similarweb%2Fkubectl-ipick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/similarweb%2Fkubectl-ipick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/similarweb%2Fkubectl-ipick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/similarweb","download_url":"https://codeload.github.com/similarweb/kubectl-ipick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247324436,"owners_count":20920646,"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":[],"created_at":"2024-08-01T06:00:48.923Z","updated_at":"2025-04-05T10:30:50.826Z","avatar_url":"https://github.com/similarweb.png","language":"Go","funding_links":[],"categories":["kubectl Plugins"],"sub_categories":["Installing plugins via awesome-kubectl-plugins"],"readme":"![Lint](https://github.com/similarweb/kubectl-ipick/workflows/Lint/badge.svg)\n![Fmt](https://github.com/similarweb/kubectl-ipick/workflows/Fmt/badge.svg)\n# kubectl-ipick\nA kubectl plugin that is easy-to-use, flexible, and interactive \nYou will have the ability to roam around the Kubernetes world with a blazing fast selection menu\n# Introduction\nLet's say we'd like to edit a resource in kubernetes using native kubectl and compare it to using kubectl-ipick.\nFirst, we'll start by trying to filter out by the relevant resource type and identify the correct resource.\nSo we'll run:\n\n```kubectl get configmap```\n\nIn some cases, we just noticed it's not the right namespace, so we'll run again:\n\n```kubectl get configmap -n \u003cnamespace\u003e```\n\nThen, we'll need to go over the list, identify our resource and copy the resource ID and trigger edit command.\n\n```kubectl edit configmap \u003cconfigmap_id\u003e -n \u003cnamespace\u003e```\n\nThis is basically what we need to do for every single resource in our cluster as resource IDs keeps changing.\nInstead, we'll leverage kubectl-ipick to minimize the number of operations.\nIn order to modify a single resource with a single operation, we can run:\n\n```kubectl ipick edit configmap --all-namespaces```\n\nThis command will query all namespaces and present a list for us to pick from, once we've chosen the right resource, the plugin will run the command we've passed as argument (edit). And we're done!\n```\n➜ kubectl ipick edit configmap --all-namespaces\nID    NAME                                 NAMESPACE\n1     cluster-info                         kube-public\n2     coredns                              kube-system\n3     nginx                                kube-system\nselect configmap from the list:\n```\nYou can even use the \"like\" filter on top of the list to show only resources that contains the supplied string.\n```\n➜  ~ kubectl ipick describe configmap --all-namespaces --like nginx \nID    NAME                              NAMESPACE\n1     nginx                             kube-system\n2     nginx-load-balancer-conf          kube-system\nselect configmap from the list:\n```\nRecommendation: make an alias to kubectl ipick to increase the speed of your work even more!\n\n```alias kp='kubectl ipick'```\n\nkubectl-ipick makes our day to day work with kubectl much more faster by listing the resources you wish to edit within a single command.\n![kubectl-ipick](/docs/images/usage.gif)\n# Installation\n\n### Via krew\nInstallation via krew (https://github.com/GoogleContainerTools/krew)\n\n```\nkubectl krew install ipick\n```\n\n### Manual\nSupported OS\n```\n# Linux\nexport OS=Linux\n# Mac\nexport OS=Darwin\n# Windows\nexport OS=Windows\n```\nExecute:\n```\n# Get the latest kubectl ipick version\nTAG=$(curl --silent \"https://api.github.com/repos/similarweb/kubectl-ipick/releases/latest\" |grep '\"tag_name\":' | sed -E 's/.*\"v([^\"]+)\".*/\\1/')\n```\n```\n# Download the relevant OS version of the plugin\ncurl -L https://github.com/similarweb/kubectl-ipick/releases/download/v${TAG}/kubectl-ipick_v${TAG}_${OS:-Linux}_x86_64.tar.gz | tar xz \u0026\u0026 chmod +x kubectl-ipick \u0026\u0026 mv kubectl-ipick /usr/local/bin\n```\n```\n# Make your life easier and...\n# Add the following Alias to your .bashrc|.zshrch|.bash_profile\n# Run kubectl ipick plugin on all namespaces\nalias kp='f(){ kubectl ipick \"$@\" ;  unset -f f; }; f'\n```\n# Usage\n```\n➜ kubectl ipick --help \n\nKubectl-ipick is an interactive kubectl plugin which wraps kubectl commands.\n\nExamples:\n\n  # Print an interactive list of namespaces and describe the chosen one\n  kubectl ipick describe namespaces\n\n  # Print an interactive list of pods filtered by --like \u003cfilter\u003e and describe the chosen one\n  kubectl ipick describe pods --like nginx\n\n  # Print an interactive list of configmap filtered by -n \u003cnamespace\u003e and edit the chosen one\n  kubectl ipick edit configmap -n kube-system\n\n  # Print an interactive list of pods filtered by --like \u003cfilter\u003e and -- \u003cexec extra flags\u003e  and exec the chosen one\n  kubectl ipick exec --like nginx -- -it bash\n\n  # Print an interactive list of pods filtered by --like \u003cfilter\u003e and -- \u003cexec extra flags\u003e  and show the chosen pod logs\n  kubectl ipick logs --like nginx -- -f\n\n  # Print an interactive list of deployments and delete the chosen one\n  kubectl ipick delete deployment\n\nUsage:\n  ipick command [resource name] [flags]\n  ipick [command]\n\nAvailable Commands:\n  help        Help about any command\n  version     Print the kubectl-ipick version\n\nFlags:\n  -A, --all-namespaces           If present, list the requested object(s) across all namespaces\n  -h, --help                     help for ipick\n      --kubeconfig-path string   By default the configuration will take from ~/.kube/config unless the flag is present\n  -l, --like string              If present, the requested resources response will be filter by given value\n  -v, --log-level string         log level (trace|debug|info|warn|error|fatal|panic) (default \"error\")\n  -n, --namespace string         If present, the namespace scope for this CLI request\n  -r, --random                   If present, one of the resources will select automatically\n  -s, --select-cluster           Select cluster from .kube config file\n\nUse \"ipick [command] --help\" for more information about a command.\n\n```\n\n# Contributing\nAll pull requests and issues are more than welcome! \nPlease see [Contribution guidelines](./CONTRIBUTING.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimilarweb%2Fkubectl-ipick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimilarweb%2Fkubectl-ipick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimilarweb%2Fkubectl-ipick/lists"}