Como ajudar suas equipes de desenvolvimento a começar a usar o Kubernetes

How to help your development teams get started with Kubernetes

If your company truly wants to be agile and competitive, Kubernetes needs to be part of the equation.

Imagem em destaque

Containerized applications and microservices are all the rage across the enterprise business landscape. There's a reason (or twelve) for this. First, containers allow companies to quickly (even automatically) scale their deployments as needed. There is also a level of automation that traditional monolithic applications cannot achieve.

Reasons for deploying applications in containers aside, once you start going down this rabbit hole, you'll 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 only deploy but also manage those deployments with very granular control and at scale.

But chances are your development teams will be able to jump right into the Kubernetes waters without first knowing what they're getting into. That's where you come in. With a little help from you (or other managers), you can prepare your teams so they don't stumble and struggle with Kubernetes.

Why is this necessary? Because Kubernetes is not easy. In fact, it may very well be one of the most challenging pieces of technology your development teams will use.

That said, let's find out how you can help these teams get started with Kubernetes.

It all starts with Docker

Here's the thing: Docker and Kubernetes already worked really well together. In fact, Kubernetes used to rely on Docker to function. However, Kubernetes dropped Docker support from the platform in recent releases. It's a shame, as Docker is one of the easiest ways to learn how to use and deploy containers.

But even though Docker has been retired from Kubernetes, you can still start your Kubernetes development company with Docker. Because Docker is so easy to understand and use, your developers can get to grips with how containerized applications work with almost no effort.

Discover the components

In addition to the runtime (like Docker, Podman, containerd), your development 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 that it is 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 worker nodes.
  • kube-controller-manager – responsible for observing an object within the cluster and ensuring that the current state matches the desired state.
  • cloud-controller-manager – allows you to link your cluster to a cloud provider.
  • kubelet – responsible for communicating with Kubernetes.
  • kube-proxy – network proxy running on all nodes.
  • node – a worker machine connected to the cluster.

JSON

Every Kubernetes manifest has several things in common, but it all starts with JSON, which stands for JavaScript Object Notation. It is the format in which all Kubernetes manifests are written.

Understanding JSON formatting is essential for learning Kubernetes. An example Kubernetes manifest might look 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 is very important to understand how layout works and how it largely depends on indentation consistency. If the indentations in your manifests are not consistent, deployments will fail.

All about the command line

There are many powerful GUI tools you can use for Kubernetes, but at some point, your developers will have to get comfortable with the command line. Whether you are deploying your containerized applications and microservices in an internal data center or on a third-party cloud host (such as AWS or Azure), command line interface (CLI) will become a necessity.

This is especially true if you plan to add CI/CD (Continuous Integration/Continuous Deployment) into the mix.

Speaking of CI/CD…

GitHub

If your company plans to leverage CI/CD for agile workflows and automated deployments, your development teams will need to have a solid understanding of how GitHub works. And we're not just talking about the web-based interface, but also the command line. Your teams need to be able to connect to (and work from) a GitHub repository and link it to your Kubernetes cluster if they want to achieve any level of consistent, agile automation.

Start small

Instead of having your teams dive straight into Kubernetes, you might be better off getting them to take small steps with products like MiniKube, which makes it really easy to set up a local Kubernetes cluster on macOS, Linux, and Windows. With MiniKube in use, your individual developers can familiarize themselves with how Kubernetes works without interacting directly with your production deployments.

Use Minikube as a testing and training ground. Once your developers are fluent with this technology, they should be ready to move to the real technology.

Conclusion

Although Kubernetes is a very challenging platform, if your developers jump into it with a little planning and understanding, they should have no problem helping put your company head to head with the competition. Add these same developers into the mix without a little control and problems can arise.

Related Content

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.