Understanding Kubernetes Expressions and Services

…venture deeper into DevOps

Gabriel Varaljay
trendfingers
3 min readJul 2, 2023

--

Kubernetes, often abbreviated as K8s, is an open-source container orchestration system for automating application deployment, scaling, and management. As you delve into the world of Kubernetes, you come across several terminologies or ‘expressions’, which might initially seem perplexing. In this article, we will simplify the most commonly used expressions and services on Kubernetes so as you venture deeper into DevOps; you’ll be well-equipped with the necessary knowledge.

Midjourney prompt: A giant inflatable castle on the ocean, during a storm, heavy seas. people playing. shot on DJI Mavic3, extreme environment, serene and surreal experience. — ar 3:2 — q 2 — s 250 via @Cakedroid

Pod

A Pod is a smallest and simplest unit in the Kubernetes object model you create or deploy. Each Pod encapsulates an application container (or, in some cases, multiple tightly-coupled containers), storage resources, a unique network IP, and options that govern how the container(s) should run.

Service

In Kubernetes, a Service is an abstraction that defines a logical set of Pods and a policy to access them. Services enable loose coupling between dependent Pods. While Pods are ephemeral and might fail, the Service ensures the network traffic is correctly routed to the right Pods over time.

‘Ephemeral’ is an adjective derived from the Greek word ‘ephemeros’, which means ‘lasting only one day’. In computing and British English, ‘ephemeral’ refers to something temporary or short-lived.

In Kubernetes, when we say that Pods are ephemeral, we mean that they can be created, deleted, and replaced frequently and easily. They aren’t intended to last long or be persistently available. Instead, they exist as long as needed, and when they are no longer necessary, they are discarded.

Ingress

Ingress in Kubernetes is an API object that manages external access to the services in a cluster, typically HTTP. Ingress can provide load balancing, SSL termination and name-based virtual hosting. It is a collection of rules allowing inbound connections to reach the cluster services.

ConfigMap

ConfigMap is a Kubernetes object used to store non-confidential data in key-value pairs. It allows you to decouple environment-specific configuration from your application, making your applications portable. Pods can consume ConfigMaps as environment variables, command-line arguments, or as configuration files in a volume.

Secret

While ConfigMap is for non-sensitive data, Secret is a Kubernetes object that stores sensitive information like passwords, OAuth tokens, and ssh keys. Using Secrets gives you control over sensitive data and reduces the risk of accidental exposure.

Volume

In Kubernetes, a Volume is essentially a directory, possibly with some data accessible to the containers in a Pod. It’s a mechanism for persisting data generated by Docker containers. Unlike the temporary disk space provided by a Docker container, a Volume’s lifespan is tied to the Pod that encloses it.

Deployment

A Deployment controller provides declarative updates for Pods and ReplicaSets. You describe a desired state in a Deployment object, and the Deployment controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets or to remove existing Deployments and adopt all their resources with new Deployments.

StatefulSet

StatefulSet is a Kubernetes controller that manages the deployment and scaling of a set of Pods while providing guarantees about the ordering and uniqueness of these Pods. It is used for applications that require stable network identifiers, durable, persistent storage, and graceful deployment and scaling.

To summarise, understanding Kubernetes expressions and services is essential to becoming adept at using Kubernetes. While it may seem daunting at first, once you grasp these fundamental concepts, you’ll find it much easier to navigate the landscape of container orchestration with Kubernetes. Familiarity with these terms will enhance your Kubernetes experience and enable you to solve complex challenges in your DevOps journey.

--

--

Gabriel Varaljay
trendfingers

Multi-Cloud & DevOps | AWS | Microsoft Azure | Google Cloud | Oracle Cloud | Linux | Terraform | digital problem solver