{"id":13472009,"url":"https://github.com/pusher/k8s-auth-example","last_synced_at":"2025-12-30T00:48:44.384Z","repository":{"id":66022348,"uuid":"123113434","full_name":"pusher/k8s-auth-example","owner":"pusher","description":"Example Kubernetes Authentication helper. Performs OIDC login and configures Kubectl appropriately.","archived":false,"fork":false,"pushed_at":"2019-05-26T20:48:59.000Z","size":21,"stargazers_count":107,"open_issues_count":4,"forks_count":23,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-01T16:28:34.067Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pusher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2018-02-27T10:31:44.000Z","updated_at":"2024-07-06T03:19:24.000Z","dependencies_parsed_at":"2023-07-03T04:25:12.813Z","dependency_job_id":null,"html_url":"https://github.com/pusher/k8s-auth-example","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/pusher%2Fk8s-auth-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fk8s-auth-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fk8s-auth-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fk8s-auth-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pusher","download_url":"https://codeload.github.com/pusher/k8s-auth-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222151628,"owners_count":16939423,"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":[],"created_at":"2024-07-31T16:00:51.092Z","updated_at":"2025-12-30T00:48:44.136Z","avatar_url":"https://github.com/pusher.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Kubernetes Authentication Example\nThis code is provided verbatim as an example of how to connect to an OIDC\nprovider and authenticate users before configuring their `kubeconfig`.\n\nAt [Pusher](https://pusher.com), we distribute a copy of this app to our engineers\nwhich sources all required information from Vault and configures their cluster\ncontexts as well.\n\nYou may also wish to build your own version of this app, sourcing it's\nconfiguration automatically, to improve your user-experience.\n\n## Attribution\nThis project started life as the [Dex example app](https://github.com/coreos/dex/tree/master/cmd/example-app).\n\n## Usage\nYou will need to configure an OIDC application with your Identity Provider.\n\nThe redirect URI should be `http://127.0.0.1:5555/callback` and you will need to\nmake a note of the issuer URL and the client secret that you set/are given.\n\nWe use Dex so I've included an example Dex config snippet below:\n```\nstaticClients:\n- id: kubernetes\n  redirectURIs:\n  - 'http://127.0.0.1:5555/callback'\n  name: 'Kubernetes API'\n  secret: c3VwZXJzZWNyZXRzdHJpbmcK\n```\n\nWith this configuration, and a Dex instance running at https://auth.exmaple.com/dex,\nthe following command will initiate the login flow:\n```\n./k8s-auth-example --client-secret c3VwZXJzZWNyZXRzdHJpbmcK --client-id kubernetes --issuer https://auth.exmaple.com/dex\n```\n\n## Building\nThe application is written in Go using [`dep`](https://github.com/golang/dep)\nas the package manager. The following will get you your first build:\n\n```\ngo get git@github.com/pusher/k8s-auth-example\ncd $GOPATH/src/github.com/pusher/k8s-auth-example\ndep ensure\ngo build -o k8s-auth\n```\n\n## Communication\n\n* Found a bug? Please open an issue.\n* Have a feature request. Please open an issue.\n* If you want to contribute, please submit a pull request\n\n## Contributing\nPlease see our [Contributing](CONTRIBUTING.md) guidelines.\n\n## License\nThis project is licensed under Apache 2.0 and a copy of the license is available [here](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpusher%2Fk8s-auth-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpusher%2Fk8s-auth-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpusher%2Fk8s-auth-example/lists"}