Written on 5th September 2023 - 3 minutes

Docker, Kubernetes, and Container Orchestration – all that good stuff (with a bit of Windows thrown in for fun)

Docker Kubernetes

I’ve been working with Docker for a number of years now, especially running container workloads on Windows, and I wanted to share my experiences. Not necessarily as a comprehensive document about all things Docker, but to provide additional content, to add to what’s already there and potentially to provide a different angle that might be helpful to people.

So, let’s start by talking about my motivations for why I’m so keen on containerisation. It’s really down to two points that containers bring:

  • Consolidation while isolating workloads
  • Infrastructure as code

 

I’ve been into the idea of consolidation since virtual machines became a thing, I love virtualisation. The idea that you can run multiple workloads on the same physical infrastructure, while keeping them isolated and moving those workloads around, really appeals to me. The convenience of being able to manage that while being transparent to the end-user has so many benefits for agility and flexibility. We can scale up and down as system load dictates, and the tooling these days is so mature, it makes managing these environments really low friction. You can back up whole systems, restore them to different physical hardware and the system has no idea. I can go on and on.

The main downside of virtualisation, though, is the additional operating system overhead for each virtual machine. There’s a lot of duplicate resources being used up with each VM, and this is where containers 1can really add value. They don’t have that overhead as the operating system is shared with the host server. This comes with trade-offs, of course, but with containers you can really pack those workloads in and make best use of the available resources while still maintaining that agility and scalability.

 

Then we come on to Infrastructure as Code. It documents how environments are set up. It automates that for you so you can repeat the same steps easily. You can version control all of this so you can go back to older versions of an environment. Again, I could go on and on about these benefits.

 

Now, you can definitely take this approach with VMs, and there are several mature tools that will support that effort…but, it’s just so easy to remote into a VM and make that subtle tweak to the configuration to get that app running, especially when there’s a deadline looming. Then, suddenly, all your best intentions and effort put into your Chef or Ansible scripts goes out the window. It’s especially easy to do with Windows. Out the window/Windows, see what I did there?! Sigh… anyway…

With Docker, you start from an Infrastructure as Code perspective with the Dockerfile approach to building images. Yes, you can still technically go in and muck around with configuration without it being documented, but that’s harder to do than with VMs, and I’m not going to tell you how, so there! Embrace the benefits and constraints of working with scripted environment setup and learn to love it, even when it feels like Windows developers, and Microsoft, are determined to make your life difficult. Don’t worry, we’ll come on to dealing with containers on Windows later. I’ve got some great tips on how to work with the various installer software packages you see on Windows. We’ll get most2 of your Windows workloads running in containers.

 

Right, so you know containers are good for you, where do we go next? I’ve talked about containers, a tiny bit about Docker, and not even started on Kubernetes3 yet. How does this all fit in? What about Windows and k8s? Well, it’s all part of the journey. Yes, you can jump straight to k8s, but I feel if you understand the fundamentals and work towards why you’d be interested in k8s, you’ll get a more useful, practical understanding of the whole thing. That will be more useful to you in the long run.

 

So, here’s how I plan to lay out the series of articles. Some things might change a little along the way, but we’ll get there! I’m going to cover the following topics in the next few articles:

 

Docker on Windows, Windows Containers, environment set-up, and the dreaded Windows Server version compatibility challenges.

  • Orchestration. Why, what is it? From basic Docker commands, to docker-compose, to Swarm mode.
  • Swarm mode pros and cons, and how to cover off missing features.
  • Why Kubernetes? What options do we have when working with Windows workloads
  • A comparison of Swarm mode and Kubernetes, and how the various concepts translate.
  • A summary of all these points, what to do, and where to go next.

 

Hopefully, I’ve whetted your appetite and I’ll see you in the next article.

Share this post

Contact Us