Containerized applications and microservices are all the rage across the entire landscape of enterprise businesses. There’s a reason (or twelve) for that. First off, containers make it possible for businesses to quickly (even automatically) scale their deployments as needed. There’s also a level of automation to be had that traditional monolithic apps can’t achieve.
Reasons for deploying containerized applications aside, once you start chasing down that rabbit hole, you will eventually realize that it leads directly to Kubernetes.
What is Kubernetes? Simply put, Kubernetes is a container orchestration platform that makes it possible to not just deploy but manage those deployments with very granular control and at a massive scale.
But chances are pretty good your development teams are going to be able to just jump right into the Kubernetes waters without first knowing what they are getting into. That’s where you come in. With a bit of help from you (or other managers), you can prepare your teams such that they won’t stumble and struggle with Kubernetes.
Why is this necessary? Because Kubernetes isn’t easy. In fact, it might well be one of the most challenging pieces of technology your dev teams will ever use.
With that said, let’s find out how you can help those teams get started with Kubernetes.
It starts with Docker
Here’s the thing: Docker and Kubernetes once played very well together. In fact, Kubernetes used to depend on Docker to function. However, Kubernetes has stripped Docker support from the platform in recent releases. This is a shame, as Docker is one of the easiest ways to learn how to use and deploy containers.
But even though Docker has been stripped away from Kubernetes, you can still start your development teams with Docker. Since Docker is so easy to understand and use, your developers can get up to speed with how containerized applications work without nearly the struggle.
Know the Components
Besides the runtime (such as Docker, Podman, containerd), your dev teams will need to be familiar with the rest of the components that make up Kubernetes. These components are:
- kube-apiserver – exposes the Kubernetes API so it’s possible to talk to the cluster.
- etcd – distributed key-value store where cluster-related data is stored.
- kube-scheduler – responsible for scheduling all pods on the worker nodes.
- kube-controller-manager – responsible for observing an object within the cluster and making sure that the current state matches the desired state.
- cloud-controller-manager – makes it possible to link your cluster to a cloud provider.
- kubelet – responsible for communicating with Kubernetes.
- kube-proxy – network proxy that runs on every node.
- node – a worker machine connected to the cluster.
Understanding JSON formatting is essential for learning Kubernetes. A sample Kubernetes manifest might look something like this:
apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80
It’s very important to understand how the layout works and how it’s very much dependent on consistency in indentation. If the indentations within your manifests aren’t consistent, deployments will fail.
All About the Command-Line
There are plenty of powerful GUI tools you can use for Kubernetes, but at some point, your developers will have to become comfortable with the command line. It doesn’t matter if you are deploying your containerized applications and microservices to an in-house data center or a third-party cloud host (such as AWS or Azure), the command-line interface (CLI) will become a necessity.
This is especially true if you plan on adding CI/CD (Continuous Integration/Continuous Deployment) into the mix.
Speaking of CI/CD…
If your company has plans on leveraging CI/CD for agile workflows and automated deployments, your dev teams will need to have a solid understanding of how GitHub works. And we’re not talking about just the web-based interface, but the command line as well. Your teams need to be able to connect with (and work from) a GitHub repository and link it to your Kubernetes cluster if they want to achieve any level of consistent and agile automation.
Instead of having your teams dive right into the thick of Kubernetes, it might be best to have them take baby steps with the likes of MiniKube, which makes it very easy to set up a local Kubernetes cluster on macOS, Linux, and Windows. With MiniKube in use, your individual developers can get up to speed with how Kubernetes works, without directly interacting with your production deployments.
Use Minikube as a testing and training ground. Once your developers are fluent with this piece of technology, they should be ready to migrate to the real thing.
Although Kubernetes is a very challenging platform, if your developers are brought into it with a bit of planning and understanding, they shouldn’t have any problems helping to get your company toe-to-toe with the competition. Throw those same developers into the mix without a bit of handholding and trouble could ensue.