How aldinkapetanovic/terraform-aws-ec2-ansible-microk8s works
This repository provisions AWS-hosted MicroK8s infrastructure with Terraform and provides Ansible playbooks for preparing and configuring the cluster. The documented workflow is to apply Terraform, then run playbooks against an inventory; the README also describes remote kubeconfig access, the Kubernetes dashboard, and an optional Rancher installation. Source excerpts were unavailable, so links between individual configuration files and playbooks are omitted where their wiring cannot be confirmed.
Main entry points: README.md Terraform apply · playbooks MicroK8s cluster · provider.tf AWS provider · instance.tf EC2 instances
Components 23
AWS infrastructure
- Terraform apply
README.md - AWS provider
provider.tf - EC2 instances
instance.tf - SSH key
key.tf - Ansible inventory
inventory.tf - Terraform outputs
output.tf - Variables
vars.tf - Provider versions
versions.tf
Cluster configuration
- Upgrade host
playbooks/upgrade.yml - Reboot host
playbooks/reboot.yml - Install MicroK8s
playbooks/snap-microk8s.yml - Additional packages
playbooks/additional-packages.yml - Oh My Zsh
playbooks/oh-my-zsh.yml - Configure SSH
playbooks/ssh-key.yml - Enable addons
playbooks/enable-addons.yml - Join cluster
playbooks/join.yml - MicroK8s cluster
playbooks
Cluster access
- Remote kubeconfig
README.md - Dashboard access
README.md - Rancher install
README.md
Other components
- Operator
- AWS
- Helm chart repository
Connections 31
- Operator → Terraform apply: runs
- Terraform apply → AWS provider: uses
- Terraform apply → EC2 instances: applies
- Terraform apply → SSH key: applies
- Terraform apply → Ansible inventory: applies
- Terraform apply → Terraform outputs: reads
- Terraform apply → Variables: uses
- Terraform apply → Provider versions: uses
- AWS provider → AWS: connects
- EC2 instances → AWS: provisions
- Operator → Upgrade host: runs
- Operator → Reboot host: runs
- Operator → Install MicroK8s: runs
- Operator → Additional packages: runs
- Operator → Oh My Zsh: runs
- Operator → Configure SSH: runs
- Operator → Enable addons: runs
- Operator → Join cluster: runs
- Upgrade host → MicroK8s cluster: configures hosts
- Reboot host → MicroK8s cluster: reboots hosts
- Install MicroK8s → MicroK8s cluster: installs
- Additional packages → MicroK8s cluster: configures hosts
- Oh My Zsh → MicroK8s cluster: configures hosts
- Configure SSH → MicroK8s cluster: configures access
- Enable addons → MicroK8s cluster: enables addons
- Join cluster → MicroK8s cluster: joins nodes
- Operator → Remote kubeconfig: retrieves
- MicroK8s cluster → Remote kubeconfig: provides config
- Operator → Dashboard access: port-forwards
- Operator → Rancher install: installs
- Rancher install → Helm chart repository: fetches chart