Before starting with what is Kubernetes ? Lets first know why we need Kubernetes and what all alternative options we have.
When we deploy multiple containers of our application, its very tedious job to manage them on production like environments. Even if we want to run and manage multiple containers on a single server, it won’t be easy. There are several scenarios to take care, like making our infra highly available, scalable, secured and most important, easily manageable.
Lets look into what were pain areas of container running in stand-alone and what is motivation behind Orchestration.
Docker is now widely used by leading industries for easy and fast deployment of application packages with all of its dependencies and configurations. Before we discuss more about docker, let’s look back into time when we were not following DevOps practices and docker came into picture, we were having following pain areas :
Portability on Different Dev, Test, Prod environments : Due to multiple environments, we faces a common problem of “It Works On My Machine, why not there ?”. Manual process of configuring environments might lead to missing configurations, dependencies or packages, resulting to application breakdown.
Golden Images …
Cluster Management using Mesos as cluster manager, Marathon as its framework.
Before going into what is cluster management , what is task scheduling lets see few things like the problems before Mesos, static partitioning , dynamic partitioning etc.
In the above mentioned diagram we have a racks of servers, and we can see fixed servers are assigned to different applications MySQL, Cassandra, Rails, Hadoop, Memcached.
Now lets take a scenario that the Hadoop servers are fully utilized and more servers are needed for Hadoop. …
StatsD is a smart Node.js package that collects and aggregates statistics from differents apps sent over the UDP protocol. At a set time interval it forwards the aggregated data to a configured backend. We can use AWS Cloudwatch as its backend for monitoring purposes.
AWS cloudwatch have its own metrics, what if we want to have our own application’s metrics on AWS cloudwatch? We can use Statsd, using which we can send our applicaction’s custom metrics to cloudwatch and use those metrics accordingly for alarms and monitoring.
Here I have used Docker to deploy an application, MySQL as its database and Nginx as load balancer i.e. Two Docker containers will communicate with one MySQL container with the help of Nginx container. I have complete setup ready on my github repository i.e. https://github.com/kailashv/php_mysql_lb.git
Please refer the repository mentioned above. There is Dockerfile for application, database and load balancer.
In this page we will see how to setup a new private Docker registry.
Private registry :
A private registry is used as your private repository for Docker images. We can use it just like other public repositories available : Docker Hub, AWS ECR (EC2 Container Registry) etc.
We need a private repository if we want to keep our Docker images private and don’t want to push it to public repositories. We can use a private repository to shift our Docker images from one stage to another just like form Development to QA and further ahead to Stage and Production…