{"id":13574276,"url":"https://github.com/atombender/ktail","last_synced_at":"2025-04-06T02:08:26.255Z","repository":{"id":41081472,"uuid":"89192442","full_name":"atombender/ktail","owner":"atombender","description":"A tool to easily tail Kubernetes container logs","archived":false,"fork":false,"pushed_at":"2024-04-19T12:15:57.000Z","size":836,"stargazers_count":313,"open_issues_count":1,"forks_count":16,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-04-19T13:36:00.172Z","etag":null,"topics":["cli","devops","golang","kubernetes","logging","tail","tool"],"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/atombender.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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,"dei":null}},"created_at":"2017-04-24T03:08:09.000Z","updated_at":"2024-04-23T14:26:26.131Z","dependencies_parsed_at":"2023-12-31T01:31:13.769Z","dependency_job_id":"5a5b0a60-e861-4f6b-b6fc-214047eaa4c7","html_url":"https://github.com/atombender/ktail","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atombender%2Fktail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atombender%2Fktail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atombender%2Fktail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atombender%2Fktail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atombender","download_url":"https://codeload.github.com/atombender/ktail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423514,"owners_count":20936626,"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":["cli","devops","golang","kubernetes","logging","tail","tool"],"created_at":"2024-08-01T15:00:49.354Z","updated_at":"2025-04-06T02:08:26.201Z","avatar_url":"https://github.com/atombender.png","language":"Go","readme":"# `ktail` is a tool to tail Kubernetes containers\n\n## It's like `kubectl logs`, but with a bunch of nice features\n\n![Terminal animation](./docs/terminal.gif)\n\n:white_check_mark: **Detects pods and containers as they come and go**. If you run `ktail foo` and later start a pod or container named `foo`, then it will be picked up automatically. `kubectl` only works on a running pod/container.\n\n:white_check_mark: **Tails multiple pods and containers in multiple namespaces** at the same time, based on names and labels. `kubectl` can only tail a single pod and container. ktail will match the pattern or patterns you specify against both the pod name and the container name.\n\n:white_check_mark: **All containers in a pod are tailed by default**, not just a specific one. With `kubectl`, you have to use `-c`. With ktail, just do `ktail foo` and all its containers are automatically tailed.\n\n:white_check_mark: **Recovers from failure**. ktail will keep retrying forever. `kubectl` often just gives up.\n\n:white_check_mark: **Better formatting**. ktail will show log lines in different colours, and has syntax highlighting of JSON payloads.\n\n# Usage\n\nktail makes it super easy to tail by pod or container name. The following will match all containers whose pod name or container name contains the substring `foo`:\n\n```shell\n$ ktail foo\n```\n\nThe arguments are regular expressions, so this is possible:\n\n```shell\n$ ktail '^foo'\n```\n\nIf no filters are specified, _all_ pods in the current namespace are tailed.\n\nTailing supports the usual things like labels:\n\n```shell\n$ ktail -l app=myapp\n```\n\nThis will tail all containers in all pods matching the label `app=myapp`. As new pods are created, it will also automatically tail those, too.\n\nTo abort tailing, hit `Ctrl+C`.\n\n## Options\n\nRun `ktail -h` for usage.\n\n## Configuration\n\nKtail will read the file `$HOME/.config/ktail/config.yml` if it exists. This must be a file in YAML format. The following options can be set (these are the defaults):\n\n```yaml\nnoColor: false\nraw: false\ntimestamps: false\nquiet: false\ncolorScheme: bw\ncolorMode: auto\nkubeConfigPath: \"\"\ntemplateString: \"\"\n```\n\n## Templating\n\nktail has a basic output format. To override, you can use a simple Go template. For example:\n\n```shell\n$ ktail -t \"{{.Container.Name}} {{.Message}}\"\n```\n\nThe following variables are available:\n\n* `Timestamp`: The time of the log event.\n* `Message`: The log message.\n* `Pod`: The pod object. It has properties such as `Name`, `Namespace`, `Status`, etc.\n* `Container`: The container object. It has properties such as `Name`.\n\n# Installation\n\n## Homebrew\n\n```shell\n$ brew tap atombender/ktail\n$ brew install atombender/ktail/ktail\n```\n\n## Binary installation\n\nPrecompiled binaries for Windows, macOS, Linux (x64 and ARM) are available on the [GitHub release page](https://github.com/atombender/ktail/releases).\n\n## From source\n\nThis requires Go \u003e= 1.10, as we use Go modules.\n\n```shell\n$ mkdir -p $GOPATH/src/github.com/atombender\n$ cd $GOPATH/src/github.com/atombender\n$ git clone https://github.com/atombender/ktail\n$ cd ktail\n$ go install .\n```\n\n# Acknowledgements\n\nSome setup code was borrowed from [k8stail](https://github.com/dtan4/k8stail).\n\n# License\n\nMIT license. See `LICENSE` file.\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatombender%2Fktail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatombender%2Fktail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatombender%2Fktail/lists"}