Describing OpenShift and Kubernetes
Muhammad Bilal
Cloud Engineer with FinOps Focus Skills | Optimizing Hybrid-Multi Cloud Performance & Cost | 5x Azure & 2x FinOps Practioner & FinOps FOCUS Analyst Certified
OpenShift Terminology
Red Hat OpenShift Container Platform (OCP) is a set of modular components and services built on top of Red Hat Enterprise Linux and Docker. OCP adds PaaS capabilities such as remote management, multitenancy, increased security, application life-cycle management, and self-service interfaces for developers
The following figure illustrates the OpenShift software stack.
In the figure, going from bottom to top, and from left to right, the basic container infrastructure is shown, integrated and enhanced by Red Hat:
- The base OS is Red Hat Enterprise Linux (RHEL).
- Docker provides the basic container management API and the container image file format.
- Kubernetes manages a cluster of hosts (physical or virtual) that run containers. It works with resources that describe multi-container applications composed of multiple resources, and how they interconnect. If Docker is the "core" of OCP, Kubernetes is the "heart" that keeps it moving.
- Etcd is a distributed key-value store, used by Kubernetes to store configuration and state information about the containers and other resources inside the Kubernetes cluster.
OpenShift adds the capabilities required to provide a production PaaS platform to the Docker + Kubernetes container infrastructure. Continuing from bottom to top and from left to right:
- OCP-Kubernetes extensions are additional resource types stored in Etcd and managed by Kubernetes. These additional resource types form the OCP internal state and configuration.
- Containerized services fulfill many PaaS infrastructure functions, such as networking and authorization. OCP leverages the basic container infrastructure from Docker and Kubernetes for most internal functions. That is, most OCP internal services run as containers orchestrated by Kubernetes.
- Runtimes and xPaaS are base container images ready for use by developers, each preconfigured with a particular runtime language or database. The xPaaS offering is a set of base images for JBoss middleware products such as JBoss EAP and ActiveMQ.
- DevOps tools and user experience: OCP provides Web and CLI management tools for managing user applications and OCP services. The OpenShift Web and CLI tools are built from REST APIs which can be leveraged by external tools such as IDEs and CI platforms.
A Kubernetes cluster is a set of node servers that run containers and are centrally managed by a set of master servers. A server can act as both a server and a node, but those roles are usually segregated for increased stability.
OpenShift and Kubernetes architecture
An OpenShift cluster is a Kubernetes cluster and can be managed the same way, but using the management tools provided OpenShift (CLI/Web Console) allows for more productive workflows and makes common tasks much easier.
Kubernetes Resource Types
Kubernetes has five main resource types that can be created and configured using a YAML or a JSON file, or using OpenShift management tools:
Pods
Represent a collection of containers that share resources, such as IP addresses and persistent storage volumes. It is the basic unit of work for Kubernetes.
Services
Define a single IP/port combination that provides access to a pool of pods. By default, services connect clients to pods in a round-robin fashion.
Replication Controllers
A framework for defining pods that are meant to be horizontally scaled. A replication controller includes a pod definition that is to be replicated, and the pods created from it can be scheduled to different nodes.
Persistent Volumes (PV)
Provision persistent networked storage to pods that can be mounted inside a container to store data.
Persistent Volume Claims (PVC)
Represent a request for storage by a pod to Kubernetes.
OpenShift Resource Types
The main resource types added by OCP to Kubernetes are as follows:
Deployment Configurations (dc)
Represent a set of pods created from the same container image, managing workflows such as rolling updates. A dc also provides a basic but extensible Continuous Delivery workflow.
Build Configurations (bc)
Used by the OpenShift Source-to-Image (S2I) feature to build a container image from the application source code stored in a Git server. A bc works together with a dc to provide a basic but extensible Continuous Integration/Continuous Delivery workflow.
Routes
Represent a DNS hostname recognized by the OpenShift router as an ingress point for applications and microservices.
Although Kubernetes replication controllers can be created standalone in OpenShift, they are usually created by higher-level resources such as deployment controllers.
References
Red Hat OpenShift documentation
DevsecOps and Cloud Engineer - Rich experience in IT with proficiency in AWS cloud, Azure, Kubernetes, Docker, Bash, Python, AI ,security. Motivated, team focused and problem solver. Together we achieve dreams.
4 年Wonderful explanation. These gives s clear picture of the open shift platform and Kubernates components in a well defined manner. Also, Bilal bhai feel the necessity to make people know this digital platform from his post which is a indeed a volunteer activity that spread knowledge. Salute to him.
CEO of JASs Logics PVT Limited Lahore
4 年This article shows technical capabilities of Mr Bilal. I highly appreciate his complicated concepts explanation in a such simpler manner. Keep it Up.
Sales Team leader
4 年Very useful for learner's Love your explanation about kubernet cluster.
Chief Executive Officer | Strategic Leadership, Operational Oversight | Vehicle Telematics and Fleet Management Expert | Information Technology Services Provider
4 年Well explained!! round of applause