Kubernetes for Developers Presentation at DevOps OKC
I recently gave a presentation called Kubernetes for Developers to the DevOps User Group in Oklahoma City. Anyone that missed it can access the slide deck here and watch the video below:
In addition, I’m providing a general Kubernetes overview in this blog that fills in any gaps.
What is Kubernetes?
Kubernetes, also known as K8s, is an open-source system developed by Google that automates the deployment, management, and scaling of containerized applications on the private and public cloud.
Containerized applications are precisely that: applications in separate containers that run in isolated runtime environments. Each container includes all dependencies related to the application's functional requirements, including configuration files, system libraries, and binaries.
Kubernetes is a container orchestrator
Systems increase in complexity as they grow in size. Kubernetes acts like a conductor in an orchestra (hence the name) to synergize multiple container applications so they all work together..
Other container orchestrators include:
Docker is an open-source platform that enables developers to package applications into containers. Containers include executable components that combine application source code, operating system libraries, and dependencies.
Docker Swarm is a companion application that clusters, manages, and schedules Docker containers. IT developers and administrators use Swarm to establish and manage a cluster of Docker nodes as a single virtual system.
Apache Mesos and DC/OS
Apaches Mesos is an open-source application that manages resources and tasks as a distributed systems kernel.
DC/OS (Distributed Cloud Operating System) is an open-source operating system based on Apache Mesos. Developed by Mesosphere, this application manages multiple machines on premises or in the cloud according to project requirements. It deploys containers, distributes services, and provides resource management, service discovery, and networking to coordinate and run on-premise and cloud-native services.
Nomad is a flexible scheduler and workload orchestrator. It enables developers to deploy and manage containerized and legacy applications, including Docker, microservice, non-containerized, and batch applications.
Components and Processes in a Container Management System
Tools within container management systems automate the creation, deployment, scaling, and destruction of applications within system containers.
Container orchestration in Kubernetes looks like this:
Master —> Node(s) —> Pod(s) —-> Containers
The “master” creates and schedules pods hosted by nodes. Pods comprise containers and those that run multiple containers manage them as a single entity and share resources.
Some processes include:
A Service routes traffic to a set of pods. It provides access through an abstraction layer that provides a single IP address and DNS name. Services enable developers to scale pods easily and manage load-balancing configurations.
An Ingress is an API object that exposes a service to the outside world by providing routing rules (typically HTTPS/HTTP).
A Job runs a set of pods until successful completion by retrying execution until a specified number terminates successfully.
A deployment describes the desired state of a set of pods and manages updates to those pods. Deployments can enable updated code rollouts, roll back to earlier deployment versions, and scale the number of replica pods.
Horizontal Pod Autoscaler
The Horizontal Pod Autoscaler automatically scales the number of pods in a deployment, replica set, or replication controller based on the resource’s CPU utilization.
Click here to access best practices for continuous delivery and integration to the Kubernetes engine.
Rolling Deployment in Kubernetes
Rolling deployment is the default deployment strategy in Kubernetes. It works by replacing pods from the previous application one at a time with pods from the new version without downtime.
Two options that allow developers to refine the process include:
maxSurge: The maximum number of pods allowed to be created above the desired amount of pods during an update. The default is 25%, however some developers prefer to use absolute numbers.
maxUnavailable: The number of pods allowed to be unavailable during an update. The default is 25%, however absolute numbers are also used.
Get more Kubernetes and other DevOps insights
First off, a big thanks to everyone that attended my talk!