If you’ve been to a technology conference in the last two years, you’ve probably noticed that the word Docker gets said rather a lot. But while Docker is undoubtedly useful as part of a development workflow, it hasn’t really lived up to the hype when it comes to production workloads. Docker alone is missing many of the components necessary to build complete systems - service discovery, networking, container management.
Enter Kubernetes, which provides these missing pieces and uses to Docker to enable a much more efficient way of deploying and running applications.
- Fully Open Source
- Runs on multiple platforms - Google Compute Engine, AWS, Azure, Openstack, VMWare and physical servers
- Allows for much greater efficiency, reducing costs
- Empowers developers and operations to move more quickly, reducing the effort required for new deployments
Google are running a roadshow, Google Next with a number of events around the world in June. There will be talks on Kubernetes as well as Google Cloud Platform, their public cloud offering. Bashton staff will be at the event in London, and we will of course be very happy to talk containers and cloud computing with you!
Below I’ll outline what problems Kubernetes solves.
What is a container anyway?
Part of the beauty of Docker is that it is actually pretty simple. Docker performs two main tasks - fetching images, in a manner not dissimilar to yum or apt-get, and running a process within that image with suitable Linux kernel flags to limit what that process can see. The Docker philosophy is that only one process should run inside a container. This makes it very different to a virtual machine, where a full operating system is being run. This minimalism provides the potential for a great deal of efficiency - containers start in just a few milliseconds, and many containers can easily be run on a single machine.
Enter the borg
Google announced recently that they in fact have been using containers almost exclusively for Google Search, Gmail, Google Apps and their other services for the last six years or so. They published a paper on their experiences, Large-scale cluster management at Google with Borg and they launched the Kubernetes project to bring what they had learnt to the general public. Kubernetes is a completely Open Source project. It has gained a significant contributor in Red Hat, who have a number of staff dedicated to helping build the platform.
Google offer Kubernetes as a service, Google Container Engine, but as a fully Open Source project, support for a number of other platforms has been contributed.
Today it is possible to use Kubernetes on AWS, VMWare Openstack and even ‘bare metal’ servers. This cross platform support is part of what I believe will make Kubernetes so successful, because it removes worries of vendor lock-in to a particular provider.
Services, not servers
Kubernetes allows different thinking about systems. Instead of managing servers - specifying what should be installed and how it should be configured, with Kubernetes one simply makes declarative statements about what should be running, and what services it exposes.
For example, you might say there should always be two web containers running, with a redis container to store sessions, and a MySQL container to provide a database. Kubernetes will look at the machines in your cluster, and start these containers on the most appropriate machine where resources are available. These enables much better utilisation of the resources available, whilst reducing the complexity of management required.
Each container provides a service. There’s no need to worry about IP addresses or networking - Kubernetes provides full discovery, so to connect your web application to MySQL, just tell it to connect to the host ‘mysql’ and Kubernetes handles the rest, sending traffic to wherever the container is actually running.
Advanced Deployment Patterns
Releasing new software is often a big pain point, potentially requiring interruptions to your site and introducing risk.
Kubernetes enables you to easily use advanced deploy patterns like those in use by larger organisations like Google, even on much smaller scale sites. New versions of your application can be spun up in containers alongside the old version, given ‘canary’ traffic and tested before a full switchover. This reduces the risk of deployment, enabling features and bug fixes to be released more quickly with less need for staff to babysit the process.
If you want to learn more about how Kubernetes could revolutionise your IT infrastructure, come and join us at Google Next, a free one day event taking place in multiple locations around the world. Google are providing $500 of free Google Cloud Platform credits to everyone who registers, so there will be plenty of scope for experimenting with the container based future!