{"id":26361154,"url":"https://github.com/polyseam/microkonf","last_synced_at":"2025-03-16T17:20:08.492Z","repository":{"id":234426910,"uuid":"772375804","full_name":"polyseam/microkonf","owner":"polyseam","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-15T04:20:38.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-19T09:53:45.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polyseam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-03-15T04:16:24.000Z","updated_at":"2024-04-19T09:53:51.647Z","dependencies_parsed_at":"2024-04-19T09:53:51.361Z","dependency_job_id":"22dfdb5f-3b23-4a40-8405-df8952692e8d","html_url":"https://github.com/polyseam/microkonf","commit_stats":null,"previous_names":["polyseam/microkonf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyseam%2Fmicrokonf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyseam%2Fmicrokonf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyseam%2Fmicrokonf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyseam%2Fmicrokonf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polyseam","download_url":"https://codeload.github.com/polyseam/microkonf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902758,"owners_count":20366346,"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":"2025-03-16T17:20:07.791Z","updated_at":"2025-03-16T17:20:08.452Z","avatar_url":"https://github.com/polyseam.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# microkonf\n\nThis tool takes in the kubeconfig YAML output by `microk8s config` of your\ncurrent cndi cluster, transforms it so to be used by `kubectl` and writes it to\n`~/.kube/config`.\n\n## usage\n\nAfter adding the `microkonf.sh` file to your path and making it executable (eg.\n`chmod +x microkonf.sh`), you can run the following command to update your\n`~/.kube/config` file:\n\n```bash\nexport MICROK8S_HOST='ec2-44-199-250-39.compute-1.amazonaws.com'; \nk=$(ssh -i 'cndi_rsa' \"ubuntu@$MICROK8S_HOST\" -t 'sudo microk8s config') \u0026\u0026 echo \"$k\" | microkonf\n```\n\n## dependencies\n\n- `kubectl` used to query, update, and delete `~/.kube/config` data\n\n## transformations\n\n- updates the `server` field to the public address passed in the `MICROK8S_HOST`\n  environment variable\n- removes the `certificate-authority-data` field\n- adds the `insecure-skip-tls-verify: true` field\n- adds an `'admin'` `user` with corresponding `client-certificate-data` and\n  `client-key-data`\n\n## notes\n\nAll microk8s `clusters` are simply named `microk8s-cluster` in the\n`~/.kube/config` file, so if you have an existing microk8s cluster present, you\nwill be asked if it should be overwritten. The same applied to `users`, where\nthey are also exported from `micork8s config`.\n\n### why the weird $k variable?\n\nWe only want to pass the result of the `ssh` execution if it is successful.\n\nSee [https://stackoverflow.com/a/31424574](https://stackoverflow.com/a/31424574)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyseam%2Fmicrokonf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyseam%2Fmicrokonf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyseam%2Fmicrokonf/lists"}