git clone https://github.com/bjnandi/ansible-k3s-nginx-lb.git
nano ~/.ssh/linux.pem
chmod 400 ~/.ssh/linux.pem
Step 4: Now set permission for the directory because the Dev Container mounts the directory with default permission for everyone
chmod 755 /workspaces/ansible-k3s-nginx-lb
- In the “hosts” file:
- bastion (Public IP)
- k3s_nodes, additional_agent_nodes & nginx_lb (Private IP)
- nginx_lb(Private IP)
- For ProxyCommand (Public IP)
- To run all configurations in one comment using Makefile:
make run_ansible
- If you want run them one by one:
ansible-playbook -i hosts k3s_install.yaml
ansible-playbook -i hosts k3s_mern_deploy.yaml
ansible-playbook -i hosts config_nginx_lb.yaml
ansible-playbook -i hosts config_bastion.yaml
Happy coding! 💻✨