{"id":16927117,"url":"https://github.com/dirien/k3sair-cli","last_synced_at":"2025-03-17T07:31:48.605Z","repository":{"id":38105429,"uuid":"377238097","full_name":"dirien/k3sair-cli","owner":"dirien","description":"K3SAIR 🏴‍☠️️ ('Corsair') is a cli for the installation of k3s in an Air-Gapped environment.","archived":false,"fork":false,"pushed_at":"2025-03-05T22:13:19.000Z","size":323,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-09T03:47:38.456Z","etag":null,"topics":["cli","golang","k3s","ssh"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/dirien.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-15T17:08:36.000Z","updated_at":"2025-03-05T22:13:23.000Z","dependencies_parsed_at":"2023-11-21T01:38:34.923Z","dependency_job_id":"9bf56c89-4753-41c3-8435-8af714b29541","html_url":"https://github.com/dirien/k3sair-cli","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fk3sair-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fk3sair-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fk3sair-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fk3sair-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirien","download_url":"https://codeload.github.com/dirien/k3sair-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852428,"owners_count":20358267,"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":["cli","golang","k3s","ssh"],"created_at":"2024-10-13T20:32:59.700Z","updated_at":"2025-03-17T07:31:48.286Z","avatar_url":"https://github.com/dirien.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# K3SAIR 🏴‍☠️️ ('Corsair')\n\n`k3sair` is a cli for the installation of k3s in an Air-Gapped environment.\n\nThe idea is born, during the installation attempt in my company. So we are using this cli too, for our own\ninstallations. It is build completely on zero-trust, `k3sair` is not saving anything.\n\nIt is inspired by [k3sup](https://github.com/alexellis/k3sup), which does a great work.\n\n### TL;DR 🚀\n\nInstall via homebrew:\n\n```bash\nbrew tap dirien/homebrew-dirien\nbrew install k3sair\n```\n\nLinux or Windows user, can directly download (or use `curl`/`wget`) the binary via\nthe [release page](https://github.com/dirien/k3sair-cli/releases).\n\n### Known Limitation 😵\n\n`k3sair` is still under development and supports at the moment only amd64 architecture and no version selection. It is\nalways the binary you provide.\n\nAnd there is no HA Setup. The `install` command is for a single control plane server.\n\n### Prerequisite 📚\n\nYou should have access to a http server hosting the files from [k3s](https://github.com/k3s-io/k3s) release page. We\nuse [Artifactory](https://jfrog.com/).\n\n- k3s\n- k3s-airgap-images-`\u003carch\u003e`.tar.gz (See Known Limitation)\n\n### Usage ⚙️\n\n#### Install 💾\n\n[![asciicast](https://asciinema.org/a/420950.svg)](https://asciinema.org/a/420950)\n\n```bash\nk3sair install -h\n\nUsage:\n  k3sair install [flags]\n\nFlags:\n      --additional-k3s-exec-flags string   Add additional k3s exec flags, separate with space\n      --arch string                        Enter the target sever os architecture (amd64 supported atm)\n      --base string                        Enter the on-site proxy repository url (e.g Artifactory)\n  -h, --help                               help for install\n      --ip string                          Public ip or FQDN of node\n      --mirror string                      Mirrored Registry. (Default: '')\n      --port uint                          The ssh port to use (default 22)\n      --ssh-key string                     The ssh key to use for remote login\n      --sudo                               Use sudo for installation. (Default: true) (default true)\n      --tls-san string                     Add additional hostname or IP as a Subject Alternative Name in the TLS cert\n      --user string                        Username for SSH login (Default: root (default \"root\")\n\nExamples:\n    k3sair install \\\n    --ssh-key /ssh/cluster \\\n    --arch amd64 \\\n    --base \"https://repo.local/\" \\\n    --ip 127.0.0.1 \\\n    --user core\n```\n\n#### Join 🚪\n\n[![asciicast](https://asciinema.org/a/420961.svg)](https://asciinema.org/a/420961)\n\n```bash\nk3sair join -h   \n\nUsage:\n  k3sair join [flags]\n\nFlags:\n      --additional-k3s-exec-flags string   Add additional k3s exec flags, separate with space\n      --arch string                        Enter the target sever os architecture (amd64 supported atm)\n      --base string                        Enter the on site proxy repository url (e.g Artifactory)\n      --control-plane-ip string            Public ip or FQDN of an existing k3s server\n      --control-plane-port uint            The ssh port to use (default 22)\n  -h, --help                               help for join\n      --ip string                          Public ip or FQDN of node\n      --k3s-api-port uint                  The kube api server port. (default 6443)\n      --mirror string                      Mirrored Registry. (Default: '')\n      --port uint                          The ssh port to use (default 22)\n      --ssh-key string                     The ssh key to use for remote login\n      --sudo                                Use sudo for installation. (Default: true) (default true)\n      --user string                        Username for SSH login (Default: root (default \"root\")\n      \nExamples:\nk3sair join \\\n--ssh-key /ssh/cluster \\\n--arch amd64 \\\n--base \"https://repo.local/\" \\\n--ip 127.0.0.2 \\\n--control-plane-ip 127.0.0.1 \\\n--user core\n```\n\n#### Kubeconfig\n\n[![asciicast](https://asciinema.org/a/420965.svg)](https://asciinema.org/a/420965)\n\n```bash\nk3sair kubeconfig -h\nGet the kubeconfig from the k3s control plane server\n\nUsage:\n  k3sair kubeconfig [flags]\n\nFlags:\n  -h, --help             help for kubeconfig\n      --ip string        Public ip or FQDN of node\n      --port uint        The ssh port to use (default 22)\n      --ssh-key string   The ssh key to use for remote login\n      --sudo              Use sudo for installation. (Default: true) (default true)\n      --user string      Username for SSH login (Default: root (default \"root\")\n\n\nExamples:\nk3sair kubeconfig \\\n--ssh-key ~/.ssh/id_rsa\n--ip 127.0.0.1\n```\n\n### Contributing 🤝\n\n#### Contributing via GitHub\n\nTBA\n\n#### License\n\nApache License, Version 2.0\n\n### Roadmap 🛣️\n\n- [x] K3s private registry support [link](https://rancher.com/docs/k3s/latest/en/installation/private-registry/)\n- [x] tls-san support\n- [x] Kubeconfig: change server address 127.0.0.1 to host ip/name\n- [x] INSTALL_K3S_EXEC support\n- [x] GitHub Actions\n- [x] Release via goreleaser\n- [x] Rework codebase\n- [x] INSTALL_K3S_EXEC support with additional cli flags\n- [ ] HA Support\n- [ ] Tests\n- ...\n\n### Libraries \u0026 Tools 🔥\n\n- https://github.com/fatih/color\n- https://github.com/melbahja/goph\n- https://github.com/spf13/cobra\n- https://github.com/goreleaser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirien%2Fk3sair-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirien%2Fk3sair-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirien%2Fk3sair-cli/lists"}