Hopp til innholdet
Technical

Kubernetes guide: Why and how to use

Kubernetes can help solve previous challenges regarding container management. In this blog we explain the most ...


Kubernetes can help solve previous challenges regarding container management. In this blog we explain the most important things you need to know about Kubernetes.  

 

In the modern world containers have provided developers with more flexibility when developing and running cloud-native applications.   

 

What are Containers?  

A container is a solution to unwrap services, to compromise an application, and to make them portable across different environments. Whether it’s use for development, testing, or production, containers make it easy to quickly ramp up the number of instances to match your applications’ spikes in demand. Because the resources run from the host OS, they are much more lightweight than a normal virtual machine. Containerizing your applications is not a new thing, but it has become more popular because of the realization of benefits.  

In the past the problem with running large numbers of different containers was that you still had to keep track of them.  Having control of your containers is especially important if you are using a public cloud service, as you are billed on running time, storage, and transactions costs. It can be hard to keep track of your retired containers that could still be generating a cost for you, creating a situation where autoscaling is hard because of a lack of insight into container health.  

In comes Kubernetes; a container orchestration system.  

 

What is Kubernetes?  

Kubernetes is an open-source platform for managing containerized workloads and services that facilitate both declarative configuration and automation. It’s portable, extensible, and has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.  

We will further explain how Kubernetes cluster is used to manage your containers in an easy way. Everything that previously has been challenging with container management can now be managed with ease in Kubernetes. 

 

Why use Kubernetes?  

Kubernetes can deploy your containers to something called pods. Pods can be deployed in sets or individual pods depending on how you want to scale your application, as pods can be shut down automatically if they’re not needed, or added if demand requires it. This function alone is extremely important for companies that need to scale in seconds instead of minutes or even hours. 

In addition, Kubernetes has a huge community where tools are being developed to make it much easier to get started. Tools such as Helm and Draft enable you to deploy your applications and even rollback your applications in seconds with no downtime. Using Kubernetes an extremely attractive solution for developers. 

 

Kubernetes in Azure = Azure Kubernetes Service (AKS)  

So, what are the benefits of using Kubernetes in Azure? On a daily basis we recommend to our clients several services in Azure that can also be integrated in your Kubernetes cluster.  

  • Azure AD to increase the security of your cluster with role-based access controls 
  • Azure Key Vault to store keys and other secrets from Kubernetes  
  • Azure Traffic Manager to route your applications to the closest region for the user.  

 
What about monitoring the health of your cluster? 

When it comes to monitoring the health of your cluster there are several options. Depending on what you are used to, we would like to point out that if you are coming from the Kubernetes eco-system you might want to go for Prometheus, which works fine.  

But as we are mostly using Azure services, we recommend taking a closer look at Azure Monitor. It  monitors your cluster, nodes, and containers, and you can set up alerts to quickly discover if any thresholds are breached or service issues occur. This combines tools from the Kubernetes and Azure eco-systems to create a cluster that is secure, redundant, and scalable.  

Did you know: If you are using Kubernetes in Azure, you are responsible of upgrading the cluster to new versions, unlike PaaS services.  

 

Kubernetes - What’s next?  

Kubernetes already has a huge following and I can see that it will continue to gain traction as more and more companies see the financial benefit, scaling opportunities, and safety of running their apps in the cloud with no downtime. 

I’m going down to KubeCon in Barcelona next week and will be giving you a follow up blog including some exciting new features.  

 

If you want to learn more about Kubernetes or are curious about how you can get started? Contact us today >