{"id":15865905,"url":"https://github.com/kha7iq/plogs","last_synced_at":"2025-10-09T10:10:02.299Z","repository":{"id":208034566,"uuid":"720097813","full_name":"kha7iq/plogs","owner":"kha7iq","description":"Retrieve and manage kubernetes pod logs with filtering \u0026 highlighting","archived":false,"fork":false,"pushed_at":"2024-04-22T05:33:36.000Z","size":785,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-04T11:05:39.496Z","etag":null,"topics":["golang","kubernetes","kubernetes-plugin","logs"],"latest_commit_sha":null,"homepage":"","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/kha7iq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-11-17T15:18:34.000Z","updated_at":"2025-05-25T02:12:02.000Z","dependencies_parsed_at":"2024-04-22T06:44:34.010Z","dependency_job_id":null,"html_url":"https://github.com/kha7iq/plogs","commit_stats":{"total_commits":36,"total_committers":2,"mean_commits":18.0,"dds":0.2222222222222222,"last_synced_commit":"47069f1c87d2aad6f9142f4a4d6e03b251595023"},"previous_names":["kha7iq/plogs"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kha7iq/plogs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kha7iq%2Fplogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kha7iq%2Fplogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kha7iq%2Fplogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kha7iq%2Fplogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kha7iq","download_url":"https://codeload.github.com/kha7iq/plogs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kha7iq%2Fplogs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001323,"owners_count":26083040,"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-10-09T02:00:07.460Z","response_time":59,"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","kubernetes","kubernetes-plugin","logs"],"created_at":"2024-10-05T23:02:13.416Z","updated_at":"2025-10-09T10:10:02.282Z","avatar_url":"https://github.com/kha7iq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e\u003cimg width=30% src=\"./.github/img/logo.png\"\u003e\u003c/p\u003e\n\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#flags\"\u003eFlags\u003c/a\u003e •\n  \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e •\n\u003c/p\u003e\n\n\n# Pod Logs (plogs)\n`plogs` is a kubernetes plugin that facilitates retrieving logs from Kubernetes pods with various filtering and highlighting options. It allows users to specify the namespace, container name, labels, and mark specific words for highlighting within the logs stream.\n\n\n## Usage \n\n\u003cimg alt=\"plogs\" src=\"./.github/img/plogs.gif\" width=\"1000\" /\u003e\n\n## Installation\n\n   **You can install the \"plogs\" plugin using** `krew`\n\n```bash\nkubectl krew install plogs\n```\n\n#### Alternative Installation Methods\n\n\u003cdetails\u003e\n    \u003csummary\u003eLinux Packages\u003c/summary\u003e\n\n- Bash Install Script\n\n  By default, plogs is going to be installed at `/usr/bin/`. `sudo` privileges are required for this operation.\n\n  If you would like to provide a custom install path, you can do so as an input to the script. \n  For example, you can run `./install.sh $HOME/bin` to install plogs in the specified directory.\n\n```bash\ncurl -sL https://bit.ly/installplogs | sudo sh\n```\nOR\n```bash\ncurl -s https://raw.githubusercontent.com/kha7iq/plogs/main/install.sh | sudo sh\n```\n- DEB \u0026 RPM\n```bash\n# DEB\nexport PLOGS_VERSION=\"0.1.1\"\nwget -q https://github.com/kha7iq/plogs/releases/download/v${PLOGS_VERSION}/plogs_amd64.deb\nsudo dpkg -i plogs_amd64.deb\n# RPM\nsudo rpm -i plogs_amd64.rpm\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eManual\u003c/summary\u003e\n\n```bash\n# Chose desired version\nexport PLOGS_VERSION=\"0.1.1\"\nwget -q https://github.com/kha7iq/plogs/releases/download/v${PLOGS_VERSION}/plogs_linux_amd64.tar.gz \u0026\u0026 \\\ntar -xf plogs_linux_amd64.tar.gz \u0026\u0026 \\\nchmod +x plogs \u0026\u0026 \\\nsudo mv plogs /usr/bin/kubectl-plogs\n```\n\u003c/details\u003e\n\n#### Checkout [release](https://github.com/kha7iq/plogs/releases) page for all supported OS binaries.\n\n### Flags\n\n- `--mark, -m`\n  - Usage: `--mark \u003cword\u003e`\n  - Alias: `-m`\n  - Marks logs containing the specified word or sentence.\n\n- `--namespace, -n`\n  - Usage: `--namespace \u003cnamespace\u003e`\n  - Alias: `-n`\n  - Specifies the Kubernetes namespace. If not specified, uses the namespace set in the context. If context namespace is also empty, defaults to \"default\".\n\n- `--container, -c`\n  - Usage: `--container \u003ccontainerName\u003e`\n  - Alias: `-c`\n  - Specifies the container name within the pod. If not specified and the pod has multiple containers, defaults to the first container.\n\n- `--label, -l`\n  - Usage: `--label \u003clabels\u003e`\n  - Alias: `-l`\n  - Specifies labels to match for pods.\n\n- `--pod, -p`\n  - Usage: `--pod \u003cpodName\u003e`\n  - Alias: `-p`\n  - Specifies the pod name.\n\n- `--follow, -f`\n  - Usage: `--follow`\n  - Alias: `-f`\n  - Specifies to follow logs continuously.\n\n- `--tail, -t`\n  - Usage: `--tail \u003clines\u003e`\n  - Alias: `-t`\n  - Specifies the number of lines to show from the end of logs.\n\n#### Alias\nConsider adding this alias to your `.bashrc` or `.zshrc` for convenience.\n```bash\necho \"alias kpl='kubectl plogs'\" \u003e\u003e .bashcr\n\necho \"alias kplf='kubectl plogs -f'\" \u003e\u003e .bashrc\n\n``` \n\n#### Examples\n\n1. Retrieve logs from all pods matching label\n\n```bash\nkpl -n dev -l app=myapp -m \"fail\" -p my-pod -t 10\n```\n2. Retrieve logs for a specific pod:\n\n```bash\nkplf -n dev -p my-pod -t 10\n```\n### Prerequisites\n- Kubernetes cluster access or kubeconfig set up\n\n## Issues\nIf you encounter any problems or have suggestions for improvements, please [open an issue](https://github.com/kha7iq/plogs/issues) on GitHub.\n\n## Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr/\u003eFeel free to check\n[issues page](https://github.com/kha7iq/plogs/issues). You can also take a look\nat the [contributing guide](https://github.com/kha7iq/plogs/blob/master/CONTRIBUTING.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkha7iq%2Fplogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkha7iq%2Fplogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkha7iq%2Fplogs/lists"}