{"id":16911581,"url":"https://github.com/alvaroaleman/static-kas","last_synced_at":"2025-03-22T10:32:04.001Z","repository":{"id":40474899,"uuid":"464321937","full_name":"alvaroaleman/static-kas","owner":"alvaroaleman","description":"A fake kube-apiserver that serves static data from files","archived":false,"fork":false,"pushed_at":"2024-01-06T18:41:28.000Z","size":212,"stargazers_count":53,"open_issues_count":2,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-18T10:38:03.988Z","etag":null,"topics":["go","golang","k8s","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvaroaleman.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-28T03:12:43.000Z","updated_at":"2025-03-07T18:20:08.000Z","dependencies_parsed_at":"2024-01-06T19:35:27.740Z","dependency_job_id":"49de338b-acc4-49cd-89d5-3eb3070f33f6","html_url":"https://github.com/alvaroaleman/static-kas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvaroaleman%2Fstatic-kas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvaroaleman%2Fstatic-kas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvaroaleman%2Fstatic-kas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvaroaleman%2Fstatic-kas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvaroaleman","download_url":"https://codeload.github.com/alvaroaleman/static-kas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244944030,"owners_count":20536290,"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":["go","golang","k8s","kubernetes"],"created_at":"2024-10-13T19:06:41.237Z","updated_at":"2025-03-22T10:32:03.714Z","avatar_url":"https://github.com/alvaroaleman.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Static KAS\n\nA fake kube-apiserver that serves static data from an Openshift must-gather. Dynamically discovers resources and supports logs. Requires golang \u003e= 1.17.\nWhile there is no explicit documentation for the directory layout, a sample is included for testing in [./pkg/handler/testdata](./pkg/handler/testdata).\n\nUsage:\n\n1. Start the static-kas in a distinct terminal: `go run ./cmd/ --base-dir ../must-gather/quay-io-openshift-release-dev-ocp-v4-0-art-dev-sha256-ec058cf120ee79c97fa385205ae5b4ab7745e4064716cadd1e319652f5999ffd/`\n2. Create a Kubeconfig:\n```bash\ncat \u003c\u003cEOF \u003e/tmp/kk\napiVersion: v1\nclusters:\n- cluster:\n    server: http://localhost:8080\n  name: static-kas\ncontexts:\n- context:\n    cluster: static-kas\n    user: \"\"\n    namespace: default\n  name: static-kas\ncurrent-context: static-kas\nkind: Config\nEOF\n```\n3. Use `kubectl` or any other standard client to interact with the static kas: `kubectl --kubeconfig=/tmp/kk get pod`\n\n\n# Multiple dumps\n\nIf you have a folder with multiple dumps, you can add the `--kubeconfig=/tmp/kk` arg which will makke `static-kas` discover\nall dumps in there, create a kubeconfig with a context for each of them and write it to the passed location.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvaroaleman%2Fstatic-kas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvaroaleman%2Fstatic-kas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvaroaleman%2Fstatic-kas/lists"}