Configure kubernetes cluster using ansible role

Ansible is an opensource software, which is used for configuration management . Ansible is written in python language, it supports YAML language for configuration management.

Ansible is idempotance in nature , it supports declarative language .

In ansible, playbook is created for configuration automaticly . In playbook all the steps are mentioned and if it is run then all tasks are done and completed the configuration of any software. Ansible playbook helps to manage the configuration without facing any error . once playbook is created then many times it can be used, every time the configuration set will be same.

Ansible role is the concept in ansible by which tasks of playbook is divided into multiple files and becomes easy to manage it . in ansible role

  • tasks/main.yml is the main file of tasks that the role executes.
  • handlers/main.yml is the file which may be used within or outside the role.
  • defaults/main.yml is the file for default variables for the role
  • vars/main.yml is the file for storing extra variable for the role
  • files/main.yml is the file that role deploys by default
  • templates/main.yml is template that role deploys
  • meta/main.yml is the file for metadata of role

In this task role is created for configuration of kubernetes cluster.

Kubernetes is an opensource software which is used as container management tool . kubernetes cluster works on master-slave concept , Master node manage all the slave node , slave node provides the resources for launch container.

I have created a role for setup the kubernetes cluster and uploaded on ansible galaxy . This is the link for role on ansible galaxy.

Link for github repo of ansible role

Playbook for launching ec2 instance on aws and configure master node and slave node

enthusiastic for new technologies

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store