{"id":20846981,"url":"https://github.com/lvthillo/ansible-centos7-kubespray","last_synced_at":"2025-10-04T08:08:04.733Z","repository":{"id":96107905,"uuid":"144196103","full_name":"lvthillo/ansible-centos7-kubespray","owner":"lvthillo","description":"Local setup of Kubernetes using VMware Fusion, ansible and Kubespray","archived":false,"fork":false,"pushed_at":"2019-02-12T22:06:08.000Z","size":9,"stargazers_count":16,"open_issues_count":0,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-04T13:10:07.495Z","etag":null,"topics":["ansible","centos","kubespray","playbook"],"latest_commit_sha":null,"homepage":"https://medium.com/@lvthillo/install-kubernetes-on-bare-metal-centos7-fba40e9bb3de","language":null,"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/lvthillo.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,"zenodo":null}},"created_at":"2018-08-09T19:39:50.000Z","updated_at":"2023-08-30T11:20:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"d08c860c-814d-48cf-aca8-24363d2c5000","html_url":"https://github.com/lvthillo/ansible-centos7-kubespray","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lvthillo/ansible-centos7-kubespray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvthillo%2Fansible-centos7-kubespray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvthillo%2Fansible-centos7-kubespray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvthillo%2Fansible-centos7-kubespray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvthillo%2Fansible-centos7-kubespray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lvthillo","download_url":"https://codeload.github.com/lvthillo/ansible-centos7-kubespray/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvthillo%2Fansible-centos7-kubespray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274463521,"owners_count":25290113,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ansible","centos","kubespray","playbook"],"created_at":"2024-11-18T02:18:38.910Z","updated_at":"2025-10-04T08:07:59.707Z","avatar_url":"https://github.com/lvthillo.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-centos7-kubespray\n\nAnsible playbook to configure prerequisites for Kubespray on CentOS7\n\nPrerequisites for the CentOS7 machines:\n* SSH access using password with a user who has root permissions (centos in example)\n* A public key generated on your local machine\n\nThis playbook will:\n* Update packages\n* Install network tools\n* Install and configure ntpd\n* disable firewall\n* disable swap\n* enable passwordless sudo\n* enable passwordless SSH\n* set hostname\n\nAdd the IP's of your CentOS7 servers in the `hosts.ini`.\n\n```\n[all]\nnode1 ansible_host=192.168.140.101\nnode2 ansible_host=192.168.140.102\nnode3 ansible_host=192.168.140.103\n```\n\nStart the playbook. Define variables like root password, user, group and path to the public key.\n\n```\n$ ansible-playbook -i hosts.ini -u centos -k playbook.yml --extra-vars \"ansible_sudo_pass=supersecret  user=centos group=centos pubkeypath=~/.ssh/id_rsa.pub\"\n```\n\nAfter running the playbook you can start with [Kubespray](https://github.com/kubernetes-incubator/kubespray):\n```\n$ git clone https://github.com/kubernetes-incubator/kubespray\n$ cd kubespray\n$ git checkout v2.7.0\n```\n\nFollow the instructions described in the README.md\n\n```\n# Install dependencies from ``requirements.txt``\n$ sudo pip install -r requirements.txt\n\n# Copy inventory/sample as inventory/mycluster\n$ cp -rfp inventory/sample inventory/mycluster\n\n# Update Ansible inventory file with inventory builder\n$ declare -a IPS=(192.168.140.101 192.168.140.102 192.168.140.103)\n$ CONFIG_FILE=inventory/mycluster/hosts.ini python3 contrib/inventory_builder/inventory.py ${IPS[@]}\n\n# Review and change parameters under inventory/mycluster/group_var\n$ cat inventory/mycluster/group_vars/all.yml\n$ cat inventory/mycluster/group_vars/k8s-cluster.yml\n# Optional: modify the hosts.ini file to your needs.\n$ vi inventory/mycluster/hosts.ini\n[all]\nnode1   ansible_host=192.168.140.101 ip=192.168.140.101\nnode2   ansible_host=192.168.140.102 ip=192.168.140.102\nnode3   ansible_host=192.168.140.103 ip=192.168.140.103\n# possible to add additional masters\n[kube-master]\nnode1\n[kube-node]\nnode2\nnode3\n# possible to add additional etcd's\n[etcd]\nnode1\n[k8s-cluster:children]\nkube-node\nkube-master\n[calico-rr]\n[vault]\nnode1\nnode2\nnode3\n```\n\nDeploy Kubespray with Ansible Playbook.\n```\n$ ansible-playbook -u centos -b -i inventory/mycluster/hosts.ini cluster.yml\n```\n\nMore details and configuration can be found [here](https://medium.com/@lvthillo/install-kubernetes-on-bare-metal-centos7-fba40e9bb3de).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flvthillo%2Fansible-centos7-kubespray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flvthillo%2Fansible-centos7-kubespray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flvthillo%2Fansible-centos7-kubespray/lists"}