Introducing Kubernetes
The Docker and container revolution allows applications to not only deploy the runtime artifact (e.g. a Java war or jar file), but as a complete execution image, ready to be launched as a container on a server running Docker. This provided a great step forward for development and testing.
However, a container image, such as Docker, is not enough to use and manage containers in a production environment. It requires supporting features that handlenetworking and other peripheral but important activities. This is where Kubernetes fills the void in providing a standard way of managing and running containers. It allows microservices to offload these responsibilities so that containers can become more manageable and resilient.
As part of the need for applications to be cloud native, Kubernetes plays an important role by providing a infrastructure and platform fairly neutral from commerical influences for cloud or on-premise deployments.
Kubernetes focuses on solving the platform and infrastructure problem for the developer rather than solving the infrastructure problems. It provides the tools necessary to build and deploy reliable, scalable distributed applications. Some of its benefits are:
Immutability: By containerising the application, all application dependencies are formalised, the container is tagged and versioned, allowing the infrastructure to be immutable.
Declarative Configuration: Enables the user to describe exactly the execution characteristics of the application through deployments and replica sets written as yaml files which can be managed in version control.
Self Healing: Kubernetes always tries to maintain the right number of running instances of the microservice, even if an instance goes down. It augments this capabiity with liveness and health probes.
Deployment Tools: Easily perform multi-container deployments, rollbacks, automatic scheduling, service detection and load balancing.
Configuration Management: Provides different options for configuration management for your application, including environment varaiables, secrets and mounted configuration files.
Cloud Support: All major cloud service providers support managed Kubernetes services, giving the customer a fairly technology agnostic application execution platform designed to host microservices and cloud-native applications. It also makes migration to the cloud easily, by optionally starting on-premise Kubernetes deployment and migrating these over, or going straight to a cloud managed Kubernetes service.
Container Orchestration and Infrastructure Abstraction.
Pivotal Cloud Foundry has started to use Kubernetes as its container orchestration engine since 2019. Kubernetes dominates the container orchestration market in 2020 with Amazon EKS leading, followed by self-managed Kubernetes clusters, Amazon ECS, Azure AKS and Google GKE.
Kubernetes does not provide Centralised Logging. However, there are a number of third party solutions available, such as Fluentd and Kibana.