{"id":13844857,"url":"https://github.com/recall704/Husky","last_synced_at":"2025-07-12T00:32:26.436Z","repository":{"id":80529684,"uuid":"112945303","full_name":"recall704/Husky","owner":"recall704","description":"k8s 离线部署脚本","archived":false,"fork":false,"pushed_at":"2023-11-01T03:01:49.000Z","size":72749,"stargazers_count":33,"open_issues_count":1,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-05T17:43:08.933Z","etag":null,"topics":["ansible","deploy","k8s","offline"],"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/recall704.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}},"created_at":"2017-12-03T16:46:06.000Z","updated_at":"2022-10-21T00:26:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"666335d3-0b10-437e-acb8-39a15aab8a90","html_url":"https://github.com/recall704/Husky","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recall704%2FHusky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recall704%2FHusky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recall704%2FHusky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recall704%2FHusky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/recall704","download_url":"https://codeload.github.com/recall704/Husky/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225772798,"owners_count":17521893,"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":["ansible","deploy","k8s","offline"],"created_at":"2024-08-04T17:02:59.807Z","updated_at":"2025-07-12T00:32:26.393Z","avatar_url":"https://github.com/recall704.png","language":"Shell","funding_links":[],"categories":["Shell (473)","Shell"],"sub_categories":[],"readme":"这是一个离线部署 k8s 的 ansible 脚本。\n\n# 机器准备\n1. deploy 机器准备，需要一台机器执行 ansible 脚本\n2. k8s 机器准备，我当前测试过的机器为  centos 7.2 mini 64 bit\n3. 部署的版本是 1.8.2 \n\n\n# 执行脚本\n1. 在 deploy 机器上安装 ansible，推荐使用 virtualenv 创建虚拟环境\n2. 生成 ssh key 并拷贝到需要部署 k8s 的机器上\n3. 修改 src/inventory/inventory.cfg 文件，写入的节点 IP， 以及对应的变量信息\n\n\n# 部署\n\n```bash\ngit clone https://github.com/recall704/Husky.git\ncd Husky\ngit lfs install\ngit lfs pull\npip install -r requiredments.txt\ncd src\nansible-playbook -i inventory/inventory.cfg cluster.yml -v\n```\n\n部署完成后，kubectl get node 查看是否部署成功。\n\n\nTIPS:\n1. 由于有个文件超过 github 100MB 大小的限制，使用了 github 的 LFS，所以机器上需要安装 [git-lfs][1]\n2. 证书生成改为在 master 节点上，通过容器方式生成。\n\n\n\n  [1]: https://git-lfs.github.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecall704%2FHusky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecall704%2FHusky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecall704%2FHusky/lists"}