{"id":18722438,"url":"https://github.com/nleiva/ansible-kubernetes","last_synced_at":"2025-04-12T14:52:36.433Z","repository":{"id":47817455,"uuid":"393216844","full_name":"nleiva/ansible-kubernetes","owner":"nleiva","description":"Deploy managed Kubernetes clusters in the cloud","archived":false,"fork":false,"pushed_at":"2021-08-20T17:13:49.000Z","size":2492,"stargazers_count":3,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T07:34:19.508Z","etag":null,"topics":["aks","ansible","aws","azure","eks","gcp","gke","kubernetes","rhacm"],"latest_commit_sha":null,"homepage":"","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/nleiva.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}},"created_at":"2021-08-06T01:48:55.000Z","updated_at":"2024-04-01T16:19:32.000Z","dependencies_parsed_at":"2022-09-13T23:11:56.780Z","dependency_job_id":null,"html_url":"https://github.com/nleiva/ansible-kubernetes","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fansible-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fansible-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fansible-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fansible-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nleiva","download_url":"https://codeload.github.com/nleiva/ansible-kubernetes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586228,"owners_count":21128995,"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":["aks","ansible","aws","azure","eks","gcp","gke","kubernetes","rhacm"],"created_at":"2024-11-07T13:41:26.988Z","updated_at":"2025-04-12T14:52:36.412Z","avatar_url":"https://github.com/nleiva.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Provisioning an AKS, EKS, or GKE cluster with Ansible\n[![Ansible Lint](https://github.com/nleiva/ansible-kubernetes/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/nleiva/ansible-kubernetes/actions/workflows/ansible-lint.yml)\n\n\u003cp align=\"center\"\u003e\n\u003cimg height=\"400\" src=\"./pictures/k8s_ansible.png\"\u003e\n\u003c/p\u003e\n\n## Requirements\n\nAnsible 2.9+ needs to be [installed](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-with-pip) in your computer to run this. [Python3](https://wiki.python.org/moin/BeginnersGuide/Download) as well.\n\n```bash\npython -m pip install --user ansible\n```\n\n## Cloud Provider details\n\nDetails on the requirements to create a Kubernetes cluster on each cloud provider are described in the following sub-pages:  \n\n- [AKS](aks.md) (Azure)\n- [EKS](eks.md) (AWS)\n- [GKE](gke.md) (GCP)\n\n**Note**: This is work in progress.\n\n## Creating a new Kubernetes Cluster\n\nFollow these steps to provision a Kubernetes cluster.\n\n1. Clone this repository: `git clone https://github.com/nleiva/ansible-kubernetes.git`\n\n2. Make your cloud provider credentials available as environment variables (`export`). See [AKS](aks.md), [EKS](eks.md), or [GKE](gke.md) for more details.\n\n```bash\nexport \u003ccredential\u003e='...'\n```\n\n3. Run the [Playbook](main.yml) and wait a couple of minutes while your Kubernetes cluster is being provisioned. Define the cloud provider via the variable `cloud_provider` (either; `aws`, `azure`, or `gcp`).\n\n```bash\nansible-playbook main.yml -v --extra-vars \"cloud_provider=azure\"\n```\n\n## Integrating with Advanced Cluster Management\n\nSee [ACM](acm.md) for details.\n\n```bash\nansible-playbook main.yml -v --extra-vars \"acm_import=true cloud_provider=aws\"\n```\n\n## Destroying a Kubernetes Cluster\n\nFollow these steps to delete a Kubernetes cluster.\n\n1. Run the [Playbook](main.yml) with the variable `delete` set to `true`.Define the cloud provider via the variable `cloud_provider` (either; `aws`, `azure`, or `gcp`).\n\n```bash\nansible-playbook main.yml -v --extra-vars \"delete=true cloud_provider=azure\"\n```\n\n## Run from an Execution Environment\n\nYou need [ansible-navigator installed](https://github.com/ansible/ansible-navigator#installing). Here is an example to create an AKS cluster with it.\n\n```bash\nansible-navigator run main.yml -v --extra-vars \"cloud_provider=azure\"\n```\n\n**Note**: I use [podman](https://podman.io/) as my container engine (`container-engine`). You can change to another alternative in the ansible [navigator config file](ansible-navigator.yml).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnleiva%2Fansible-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnleiva%2Fansible-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnleiva%2Fansible-kubernetes/lists"}