Task: Automate Kubernetes Cluster Using Ansible.

What is Kubernetes?

Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.

Pre-Requisites:

a. AWS Account for EC2 Instances
b. Ansible Controller Node
c. Basics About K8s Cluster and Yaml
d.

So let’s get right into the Task:

♦STEP1: Provisioning the EC2 Instances with K8s Cluster setup.

♦STEP2: Creating mysql.yml which will be later applied.

♦STEP3: Creating mywp.yml for Wordpress pod which will be later applied.

♦STEP4: Creating service.yml for Exposing wordpress pod which will be later applied.

♦STEP5: Creating main task file which will run every command of kubernetes according to our requirement.

♦STEP6: Running the task file using Ansible to configure the Cluster setup.

♦STEP7: Go To Browser and type the Public Ip of the pod where we just launched the “mywp”

♦STEP8: Finally just do the setup and will land to the login page

--

--

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
Rishabh

Rishabh

Student from B.tech 2nd Year, A proud ARTH learner, love new technologies, Curious about many thing, likes to explore places, love eating pizza and much more.