{"id":15634198,"url":"https://github.com/dtan4/k8stail","last_synced_at":"2025-04-04T23:09:14.770Z","repository":{"id":13178447,"uuid":"73787110","full_name":"dtan4/k8stail","owner":"dtan4","description":"tail -f experience for Kubernetes Pods","archived":false,"fork":false,"pushed_at":"2025-03-18T18:55:19.000Z","size":1154,"stargazers_count":145,"open_issues_count":5,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T22:14:16.443Z","etag":null,"topics":["kubernetes","kubernetes-pods","tail"],"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/dtan4.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,"publiccode":null,"codemeta":null}},"created_at":"2016-11-15T07:19:37.000Z","updated_at":"2025-03-23T21:32:25.000Z","dependencies_parsed_at":"2023-10-20T19:28:49.453Z","dependency_job_id":"314e0a4b-fba8-4cc0-93dd-e763e7c65534","html_url":"https://github.com/dtan4/k8stail","commit_stats":{"total_commits":268,"total_committers":8,"mean_commits":33.5,"dds":"0.35820895522388063","last_synced_commit":"bf5bc333423bf9c0fadfe17f86aaee3d56307d8f"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fk8stail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fk8stail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fk8stail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fk8stail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dtan4","download_url":"https://codeload.github.com/dtan4/k8stail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247261612,"owners_count":20910108,"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":["kubernetes","kubernetes-pods","tail"],"created_at":"2024-10-03T10:52:19.733Z","updated_at":"2025-04-04T23:09:14.742Z","avatar_url":"https://github.com/dtan4.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8stail\n\n[![GitHub Actions](https://github.com/dtan4/k8stail/workflows/Test/badge.svg)](https://github.com/dtan4/k8stail/actions?query=workflow%3ATest+branch%3Amaster)\n[![codecov](https://codecov.io/gh/dtan4/k8stail/branch/master/graph/badge.svg)](https://codecov.io/gh/dtan4/k8stail)\n[![GitHub release](https://img.shields.io/github/release/dtan4/k8stail.svg)](https://github.com/dtan4/k8stail/releases)\n\n`tail -f` experience for Kubernetes Pods\n\nAs you know, `kubectl logs` can stream only ONE pod at the same time. `k8stail` enables you to watch __log streams of ALL pods__ in the specified namespace or labels in real time, like `tail -f`.\n\n![example](_images/example.png)\n\n## Table of Contents\n\n* [Requirements](#requirements)\n* [Installation](#installation)\n  + [Using Homebrew (OS X only)](#using-homebrew-os-x-only)\n  + [Precompiled binary](#precompiled-binary)\n  + [From source](#from-source)\n  + [Run in a Docker container](#run-in-a-docker-container)\n* [Usage](#usage)\n  + [kubeconfig file](#kubeconfig-file)\n  + [Options](#options)\n* [Development](#development)\n* [Author](#author)\n* [License](#license)\n\n## Requirements\n\nKubernetes 1.3 or above\n\n## Installation\n\n### Using Homebrew (OS X only)\n\nFormula is available at [dtan4/homebrew-dtan4](https://github.com/dtan4/homebrew-dtan4).\n\n```bash\n$ brew tap dtan4/dtan4\n$ brew install k8stail\n```\n\n### Precompiled binary\n\nPrecompiled binaries for Windows, OS X, Linux are available at [Releases](https://github.com/dtan4/k8stail/releases).\n\n### From source\n\n```bash\n$ go get -d github.com/dtan4/k8stail\n$ cd $GOPATH/src/github.com/dtan4/k8stail\n$ make deps\n$ make install\n```\n\n### Run in a Docker container\n\nDocker image is no longer provided officially.\nIf you'd like to run k8sec in Docker image, see [`Dockerfile`](Dockerfile) and build image by yourself.\n\n```bash\ndocker build -t k8stail .\n```\n\n## Usage\n\nLogs of all pods, all containers in pod in the specified namespace are streaming. When new pod is added, logs of the pod also appears.\nTo stop streaming and exit, press `Ctrl-C`.\n\n```bash\n$ k8stail --namespace awesome-app\nNamespace: awesome-app\nLabels:\n----------\nPod awesome-app-web-4212725599-67vd4 has detected\nPod awesome-app-web-4212725599-6pduy has detected\nPod awesome-app-web-4212725599-lbuny has detected\nPod awesome-app-web-4212725599-mh3g1 has detected\nPod awesome-app-web-4212725599-pvjsm has detected\n[awesome-app-web-4212725599-mh3g1][web]  | creating base compositions...\n[awesome-app-web-4212725599-zei9h][web]  |    (47.1ms)  CREATE TABLE \"schema_migrations\" (\"version\" character varying NOT NULL)\n[awesome-app-web-4212725599-zei9h][web]  |    (45.1ms)  CREATE UNIQUE INDEX  \"unique_schema_migrations\" ON \"schema_migrations\"  (\"version\")\n[awesome-app-web-4212725599-zei9h][web]  |   ActiveRecord::SchemaMigration Load (1.8ms)  SELECT \"schema_migrations\".* FROM \"schema_migrations\"\n[awesome-app-web-4212725599-zei9h][web]  | Migrating to CreatePosts (20160218082522)\n```\n\nWith `--timestamps` option, log timestamp is printed together.\n\n\n```bash\n$ k8stail --namespace awesome-app --timestamps\nNamespace: awesome-app\nLabels:\n----------\nPod awesome-app-web-4212725599-67vd4 has detected\nPod awesome-app-web-4212725599-6pduy has detected\nPod awesome-app-web-4212725599-lbuny has detected\nPod awesome-app-web-4212725599-mh3g1 has detected\nPod awesome-app-web-4212725599-pvjsm has detected\n[awesome-app-web-4212725599-mh3g1][web] 2016-11-15T10:57:22.178667425Z  | creating base compositions...\n[awesome-app-web-4212725599-zei9h][web] 2016-11-15T10:57:22.309011520Z  |    (47.1ms)  CREATE TABLE \"schema_migrations\" (\"version\" character varying NOT NULL)\n[awesome-app-web-4212725599-zei9h][web] 2016-11-15T10:57:22.309053601Z  |    (45.1ms)  CREATE UNIQUE INDEX  \"unique_schema_migrations\" ON \"schema_migrations\"  (\"version\")\n[awesome-app-web-4212725599-zei9h][web] 2016-11-15T10:57:22.463700110Z  |   ActiveRecord::SchemaMigration Load (1.8ms)  SELECT \"schema_migrations\".* FROM \"schema_migrations\"\n[awesome-app-web-4212725599-zei9h][web] 2016-11-15T10:57:22.463743373Z  | Migrating to CreatePosts (20160218082522)\n```\n\nWith `--labels` option, you can filter pods to watch.\n\n```bash\n$ k8stail --namespace awesome-app --labels name=awesome-app-web\nNamespace: awesome-app\nLabels:    name=awesome-app-web\n----------\nPod awesome-app-web-4212725599-67vd4 has detected\nPod awesome-app-web-4212725599-6pduy has detected\nPod awesome-app-web-4212725599-lbuny has detected\nPod awesome-app-web-4212725599-mh3g1 has detected\nPod awesome-app-web-4212725599-pvjsm has detected\n[awesome-app-web-4212725599-mh3g1][web]  | creating base compositions...\n[awesome-app-web-4212725599-zei9h][web]  |    (47.1ms)  CREATE TABLE \"schema_migrations\" (\"version\" character varying NOT NULL)\n[awesome-app-web-4212725599-zei9h][web]  |    (45.1ms)  CREATE UNIQUE INDEX  \"unique_schema_migrations\" ON \"schema_migrations\"  (\"version\")\n[awesome-app-web-4212725599-zei9h][web]  |   ActiveRecord::SchemaMigration Load (1.8ms)  SELECT \"schema_migrations\".* FROM \"schema_migrations\"\n[awesome-app-web-4212725599-zei9h][web]  | Migrating to CreatePosts (20160218082522)\n```\n\n### kubeconfig file\n\n`k8stail` uses `~/.kube/config` as default. You can specify another path by `KUBECONFIG` environment variable or `--kubeconfig` option. `--kubeconfig` option always overrides `KUBECONFIG` environment variable.\n\n```bash\n$ KUBECONFIG=/path/to/kubeconfig k8stail\n# or\n$ k8stail --kubeconfig=/path/to/kubeconfig\n```\n\n### Options\n\n|Option|Description|Required|Default|\n|---------|-----------|-------|-------|\n|`--context=CONTEXT`|Kubernetes context|||\n|`--debug`|Debug mode using pprof (http://localhost:6060)||`false`|\n|`--kubeconfig=KUBECONFIG`|Path of kubeconfig||`~/.kube/config`|\n|`--labels=LABELS`|Label filter query (e.g. `app=APP,role=ROLE`)|||\n|`--namespace=NAMESPACE`|Kubernetes namespace||`default`|\n|`--timestamps`|Include timestamps on each line||`false`|\n|`-h`, `-help`|Print command line usage|||\n|`-v`, `-version`|Print version|||\n\n## Development\n\nGo 1.7 or above is required.\n\nClone this repository and build using `make`.\n\n```bash\n$ go get -d github.com/dtan4/k8stail\n$ cd $GOPATH/src/github.com/dtan4/k8stail\n$ make\n```\n\n## Author\n\nDaisuke Fujita ([@dtan4](https://github.com/dtan4))\n\n## License\n\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtan4%2Fk8stail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtan4%2Fk8stail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtan4%2Fk8stail/lists"}