Tag Archives: Kubernetes

Opensource Meetup Presentation

I did a presentation on CoreOS and Service Discovery in Opensource Meetup group last week. Following are related slides and demo recording.

CoreOS Overview and Current Status

Slides:

CoreOS HA Demo recording:

Scripts used are available here.

Service Discovery using etcd, Consul and Kubernetes

Slides:

Consul Service Discovery Demo:

Following are the commands to start Consul Container, Registrator Container and 3 Container services.

docker run -d -p 8500:8500 -p 192.168.0.1:53:8600/udp -p 8400:8400 gliderlabs/consul-server -node myconsul -bootstrap
docker run -d -v /var/run/docker.sock:/tmp/docker.sock --net=host gliderlabs/registrator -internal consul://localhost:8500

docker run -d -p :80 -e "SERVICE_80_NAME=http" -e "SERVICE_80_ID=http1" -e "SERVICE_80_CHECK_HTTP=true" -e "SERVICE_80_CHECK_HTTP=/" --name=nginx1 nginx
docker run -d -p :80 -e "SERVICE_80_NAME=http" -e "SERVICE_80_ID=http2" -e "SERVICE_80_CHECK_HTTP=true" -e "SERVICE_80_CHECK_HTTP=/" --name=nginx2 nginx
docker run -ti smakam/myubuntu:v3 bash

Microservices Infrastructure using Mantl

Mantl is an Open source project from Cisco and it provides an integrated solution to deploy distributed Microservices. Any company deploying Microservices has to integrate different components before the solution becomes production ready. Mantl makes it easier by integrating the different components and providing the glue software that integrates the components. In this blog, I will cover the following:

  • Distributed Microservice infrastructure components and the need for Mantl.
  • Mantl Architecture.
  • Mantl installation using Vagrant
  • Mantl installation using AWS public cloud

Microservices infrastructure

Following are typical components in Container based Microservices infrastructure:

Continue reading Microservices Infrastructure using Mantl

Kubernetes and Google container engine

In this blog, I will cover the Google container engine service that I tried out.

Pre-requisites:

  • Need Google cloud account.
  • Install Google cloud SDK.

Google container engine is not available in the normal gcloud SDK installation. To use container engine service, we need to update preview component.

$ gcloud components update preview

I followed the 2 examples mentioned in the container engine documentation.
WordPress application:
In this example, we create a cluster which has a single master and single worker node. We create a pod running WordPress container in the cluster and expose the WordPress service to external world. Since there is only 1 pod, we dont create a service.
Following are the commands used:

Continue reading Kubernetes and Google container engine

Kubernetes on Google cloud

In this blog, I will cover the steps to run Kubernetes on Google compute VM. I used the steps mentioned here.

Pre-requisites:

  • Need Google cloud account.
  • Install Google cloud SDK.

First step is to download and unzip Kubernetes tar file from here.
Next, we create the cluster using the provided script.

export KUBERNETES_PROVIDER=gce
./cluster/kube-up.sh

The above script creates the clusters with 1 master and 4 minions. Also, it sets up all necessary services both in master and minions node.
Lets look at the VMs created:

Continue reading Kubernetes on Google cloud

Kubernetes – Overview

Earlier, I had written a blog on Docker Orchestration. This is a pretty new area and different solutions are being developed to address this problem. Few weeks back, I had written a blog on AWS EC2 Container service. Kubernetes is a Docker Orchestration engine used to manage a cluster of Containers. Google initially developed Kubernetes, currently its an open source project and source code is available here. Google Cloud’s Container engine uses Kubernetes to manage Docker Containers. Kubernetes can be used standalone or with any Cloud service like AWS, EC2.

Kubernetes basics:

Following are basic building blocks within Kubernetes:

  • Cluster(master and minion) – This is the cluster of machines where Container services are launched on. There is 1 master node and the other nodes are called as worker nodes or minions. The master node runs etcd configuration database service, scheduler to schedule the containers, api server for external clients to talk to, replication controller to manage the state of containers. The minion node runs a slave agent to talk to the master node.
  • Pods – can be a single container or a collection of containers. Containers within a pod share same characteristics and are brought up and teared down together. They are normally launched on same minion. An example could be a pod containing redis master and slave database containers. Pod configuration is defined as a json file.
  • Service – Service is an abstraction over Pod that is useful for Service discovery and exposing environment variables to other services. Example could be a database service exposing port numbers to web service.
  • Labels – Labels are used with Pods and Services for easier management of Containers through filters. Rather than managing individual Pods and Services, Containers can be managed at Label level. For example, we can say destroy all “frontend” labels.

Continue reading Kubernetes – Overview