• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Kubernetes Microservices with Docker

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a perfect timing. We are containerising our Microservices with Docker as a first step. We want to add redundancy to all our Microservices as a next step. We are looking at all possibilities and this looks interesting thing to do with Kubernetes.

So I have got a couple of questions:

1. Can I create a Master / Slave kind of an architecture with Kubernetes? Say I have Microservice A running as a Docker container. Can I have Kubernetes manage this as a Master and have 2 or 3 other instances as slaves?

2. If the Microservice A is exposing ports, how would this behave with rudundancy? Should I have multiple ports open?
 
Author
Posts: 64
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the introduction. Please post any questions related to the Kubernetes Microservices with Docker book.

Deepak
 
Deepak Vohra
Author
Posts: 64
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gandhi (from the post in the Welcome message),


The book is already available on Amazon:
https://www.amazon.com/Kubernetes-Microservices-Docker-Deepak-Vohra/dp/1484219066/ref=sr_1_3?ie=UTF8&qid=1465913744&sr=8-3&keywords=kubernetes

and on publisher's website:
http://www.apress.com/9781484219065?gtmf=s

thanks,
Deepak
 
Deepak Vohra
Author
Posts: 64
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Can I create a Master / Slave kind of an architecture with Kubernetes? Say I have Microservice A running as a Docker container. Can I have Kubernetes manage this as a Master and have 2 or 3 other instances as slaves?

To answer the first question, Kubernetes does not use the concept of containers directly and instead the atomic unit in Kubernetes is a Pod, which could consist of one or more containers for different Docker images. A cluster in Kubernetes consists of one or more Pods and a Kubernetes service could be used as an interface for the Pod/s. Clients do not access the Pods directly but do so via the service. A service is exposed on one or more endpoints corresponding to the number of Pods managed by the service; one Pod-one endpoint, two Pods-two endpoints. If Microservice A is running, it could be managed on a Master/Slave architecture, more specifically a Master/Workers architecture, which consists of two or more nodes. Multi-node architecture is discussed in Chapter 14.

2. If the Microservice A is exposing ports, how would this behave with rudundancy? Should I have multiple ports open?

You could have multiple ports for the different interfaces provided by an application. For example, for Oracle Database you could have port 1521 for the TCP/IP database listener and port 8080 as the HTTP port. Redundancy is provided by the multiple Pods in the microservice. By scaling a cluster to 10 Pods for example, 10 different clients could access the service. The clients access one of the endpoints provided by the service and the service forwards the request to one of the Pods managed by the service, selecting a Pod in a round-robin manner. Chapter 2 discusses how scaling up a cluster of Pods adds endpoints.
 
Deepak Vohra
Author
Posts: 64
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are looking at all possibilities and this looks interesting thing to do with Kubernetes.

Why use Docker containers for Kubernetes? Why not RKT containers?

Because Google (Kubernetes) is recommending the use of Docker, while it adds support for other containers.
"Our intent with our announcement for AppC and RKT support was to establish Kubernetes (our open source project) as a neutral ground in the world of containers. "
Refer
http://blog.kubernetes.io/2015/05/docker-and-kubernetes-and-appc.html
 
reply
    Bookmark Topic Watch Topic
  • New Topic