After a long absence, I'm back on the platform with a new tutorial about a kubernetes cluster deployment on X environments with a Master and X workers.
This tutorial does not necessarily require a lot of knowledge in kubernetes or ansible. Since the script executes everything for you.
You just have to fulfill the prerequisites for the proper functioning of the script.
Prerequisites
You can view / clone my work from my Github directory: https://github.com/ArsNQ/deployKubernetes
- OS : Debian 10 / 11.
- Have ansible installed on your computer.
- Have 4 machines (1 Master / 3 nodes) Can also run with 1 master & 1 node, etc...
Changes to make to run the ansible script.
First, if you haven't copy/paste your rsa.pub keys on the remote servers. You can use the join.sh script, which allows through a pem or ppk key to deploy your rsa key.
In a second step you must fill the hosts file with the information between < ... >.
And thirdly you have to fill in the --apiserver-cert-extra-sans= at the following path "/setMaster/tasks/main.yml"
Launch ansible script.
You must go to the root of this folder, and run the following command:
ansible-playbook -i hosts playbook.yml
. <-------------- HERE -------------->
├── README.md
├── hosts
├── installDocker
├── installKubernetes
├── join.sh
├── playbook.yml
├── setMaster
└── setWorkers
And if you had followed the steps that I indicated to you, you should have the following result !!
I hope this article will help you and see you soon!
Top comments (0)