{"id":13522334,"url":"https://github.com/cststack/km","last_synced_at":"2026-01-15T00:56:37.320Z","repository":{"id":84156906,"uuid":"205267785","full_name":"cststack/km","owner":"cststack","description":"EKS MFA kubeconfig management tool. Thin wrapper for kubectl.","archived":true,"fork":false,"pushed_at":"2025-02-25T18:21:17.000Z","size":312,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-02T18:02:51.005Z","etag":null,"topics":["eks","eks-cluster","eks-kubeconfig","eks-kubeconfig-management","kubeconfig","kubectl","kubectl-plugins","kubectl-switch","kubernetes","ykman","yubikey"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/cststack.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":"2019-08-29T23:32:00.000Z","updated_at":"2025-02-25T18:22:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"661f50f4-53e8-40a3-a89f-cc1c891f3ab0","html_url":"https://github.com/cststack/km","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cststack/km","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cststack%2Fkm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cststack%2Fkm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cststack%2Fkm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cststack%2Fkm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cststack","download_url":"https://codeload.github.com/cststack/km/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cststack%2Fkm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28440977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"ssl_error","status_checked_at":"2026-01-15T00:55:20.945Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["eks","eks-cluster","eks-kubeconfig","eks-kubeconfig-management","kubeconfig","kubectl","kubectl-plugins","kubectl-switch","kubernetes","ykman","yubikey"],"created_at":"2024-08-01T06:00:45.760Z","updated_at":"2026-01-15T00:56:37.304Z","avatar_url":"https://github.com/cststack.png","language":"Shell","funding_links":[],"categories":["kubectl Plugins"],"sub_categories":["Installing plugins via awesome-kubectl-plugins"],"readme":"# km \n## \u003e\u003e\u003e Replaced by https://github.com/catalinpan/km \u003c\u003c\u003c\n\nKm is a thin wrapper for kubectl which helps with the EKS kubeconfig management.\nAny other command will be proxied to kubectl so km command can be used in the same way as kubectl.\n\nCheck `km -h` for all the available options.\n\n*Tested with EKS access via iam assume role with/without MFA enabled.*\n\n## Breaking changes from v0.0.1-beta4 to v0.0.1-beta5\n\n- the clusters secured with MFA will need to be re-added using the `--mfa-profile` flag (check the examples below). This change will allow the management of the clusters without MFA including non AWS EKS cluster.\n\n## Demo\n![Demo](examples/demo.gif)\n\n## Requirements\n\n- aws-iam-authenticator (eks clusters only)\n- jq\n- awscli \u003e= 1.16 (configured like on the example, eks clusters only)\n- kubectl \u003e= 1.15\n- yubikey, ykman (optional)\n- gnu-sed, gnu-grep (MacOS)\n- [fzf](https://github.com/junegunn/fzf)\n\n## Installation\n\n### MacOS requirements\n\n```\nbrew install fzf\nbrew install grep\nbrew install gnu-sed\n```\n\n```\ncurl -L https://raw.githubusercontent.com/cststack/km/master/bin/km -o /usr/local/bin/km\nchmod +x /usr/local/bin/km\n```\n\n## Features\n\n- multiple EKS clusters can be configured. If they have the same name they can be assigned aliases.\n- context change for the cluster and the namespace (fzf is required for this)\n- run any kubectl commands via km\n- if [ykman](https://github.com/Yubico/yubikey-manager) is installed and the Yubikey is plugged there is no need to input the MFA token at all. Make sure the `--mfa-profile` matches the profile used for authentication in ykman.\n\n## Examples\n\n### Add new EKS cluster\n\nWith iam-role resolved from ~/.aws/credentials from the aws_profile\n```\nkm add --region eu-west-1 --profile aws_profile --cluster-name aws-eks-eu-west-1 --cluster-alias eks-dev\n```\n\nWith iam-role\n\n```\nkm add --region eu-west-1 --profile aws_profile --cluster-name aws-eks-eu-west-1 --cluster-alias eks-dev --iam-role arn:aws:iam::111111111111:role/EksRole\n```\n\nWith iam-role resolved from ~/.aws/credentials from the aws_profile and MFA\n```\nkm add --region eu-west-1 --profile aws_profile --cluster-name aws-eks-eu-west-1 --cluster-alias eks-dev --mfa-profile mfaProfileName/myAwsSsoProfile\n```\n\nWith iam-role and MFA\n\n```\nkm add --region eu-west-1 --profile aws_profile --cluster-name aws-eks-eu-west-1 --cluster-alias eks-dev --iam-role arn:aws:iam::111111111111:role/EksRole  --mfa-profile mfaProfileName/myAwsSsoProfile\n```\n\nImport a KUBECONFIG file.\n```\nkm --import-kubeconfig pathToKubeConfigFile\n```\n\n*The usual kubectl commands should be used to clear any cluster config from kubeconfig.*\n\n### AWS credentials file\n\n```\n[default]\nregion = eu-west-1\naws_access_key_id = xxxxxxxxxxxxxxxx\naws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nmfa_serial = arn:aws:iam::000000000000:mfa/AWS_USERNAME\n\n[aws_profile]\nrole_arn = arn:aws:iam::111111111111:role/EksRole\nregion = eu-west-1\nsource_profile = default\nmfa_serial = arn:aws:iam::000000000000:mfa/AWS_USERNAME\n```\nor\n\n```\n[myAwsSsoProfile]\nregion = eu-west-1\naws_access_key_id = xxxxxxxxxxxxxxxx\naws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nmfa_serial = arn:aws:iam::000000000000:mfa/AWS_USERNAME\n\n[aws_profile]\nrole_arn = arn:aws:iam::111111111111:role/EksRole\nregion = eu-west-1\nsource_profile = myAwsSsoProfile\nmfa_serial = arn:aws:iam::000000000000:mfa/AWS_USERNAME\n```\n\n\n## Credits\n- the guys who has created [kns](https://github.com/blendle/kns)\n- [junegunn](https://github.com/junegunn) for the fzf tool\n- and to the open source community\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcststack%2Fkm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcststack%2Fkm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcststack%2Fkm/lists"}