Microk8s Install
Install Microk8s by running the "02-microk8s.yml" playbook.
ansible-playbook 02-microk8s.yml -i inventory/cluster-1/hosts.ini
The playbook will:
- Install Microk8s
- Add ansible user to the microk8s group
- Alias kubectl and helm
- Copy the .kube/config file to the local user
- Join all the nodes to the cluster
- Enable Microk8s addons
Copy Kube Config
If you have more than one machine you can copy .kube/config file for local kubectl execution with the below SSH copy command
scp -i ~/.ssh/ansible ansible@node-1:~/.kube/config ~/.kube/config
Install Apps
Install kubernetes apps by running the "03-apps.yml" playbook
ansible-playbook 03-apps.yml -i inventory/cluster-1/hosts.ini
The playbook will:
- Ask what default database username should be. Default is "root"
- Ask what the password for the default username should be. Default is "password"
- Create a Postgres, Mongo and Redis databases with the default username and password.
Note: If there are errors creating the apps you may need to create the subfolders "subPath" on the NFS server.