DZone
Cloud Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Cloud Zone > Orchestrating Docker Containers with Kubernetes

Orchestrating Docker Containers with Kubernetes

In this post, we take a look at how you can get ahead of the curve by using IBM Bluemix's beta support of Kubernetes.

Niklas Heidloff user avatar by
Niklas Heidloff
CORE ·
Apr. 11, 17 · Cloud Zone · News
Like (3)
Save
Tweet
5.95K Views

Join the DZone community and get the full member experience.

Join For Free

last month ibm announced the beta of kubernetes support in the ibm bluemix container service . below is a short introduction to kubernetes and a short description how to get started using kubernetes on ibm bluemix.

in a nutshell, kubernetes allows running and managing cloud-native apps that consist of multiple containers. to get started you need to know some terminology. for example, a ‘deployment’ contains ‘pods’ that can contain multiple docker containers (but typically contain one container). ‘deployments’ are run in ‘worker nodes’ that are part of a ‘cluster’. ‘services’ define how deployments can be accessed. i like the following video which explains this terminology well.


to start using kubernetes on bluemix you should follow this three-part tutorial .

part 2 shows how to run multiple replicas of pods and how to scale them up and down. the screenshot shows the kubernetes web interface that displays the status of the three replicas/pods. the sample also explains how kubernetes can do health checks . if kubernetes detects an issue with a pod, it stops it and creates a new one automatically.

image title

part 3 of the tutorial shows how to use a bluemix service from a container running in kubernetes. after you’ve created an instance of a bluemix service, you can bind it to the kubernetes cluster . in the configuration yml file, the service credentials are mounted to a volume . containers can read these from there at runtime.

containers can access other containers simply via the container’s (service’s) dns name.

app.get('/analyze/:string', function(req, res) {
   request.get({ url: "http://watson-service:8081/analyze?text=" + req.params.string },
      function(error, response, body) {
         ...
     });


this is how to define a service, in this case, the ‘watson-service’.

apiversion: v1
kind: service
metadata:
  name: watson-service
  labels:
    run: watson-demo
spec:
  type: nodeport
  selector:
    run: watson-demo
  ports:
   - protocol: tcp
     port: 8081
     nodeport: 30081


Kubernetes Docker (software)

Published at DZone with permission of Niklas Heidloff, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 5 Best JavaScript Web Development Frameworks
  • Modern Application Security Requires Defense in Depth
  • How To Evaluate Software Quality Assurance Success: KPIs, SLAs, Release Cycles, and Costs
  • Caching Across Layers in Software Architecture

Comments

Cloud Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo