No history yet

OpenShift Basics

What is OpenShift?

Imagine you've built a fantastic application. Now you need to run it, scale it, and manage it without constant headaches. This is where container orchestration comes in. You might have heard of Kubernetes, the powerful open-source tool that automates the deployment and management of applications packaged in containers.

Kubernetes is a powerful container orchestration platform that automates many aspects of deploying, managing, and scaling containerized applications.

While Kubernetes is the industry standard, it can be complex to set up and use on its own. It's like having a high-performance engine without the rest of the car. Red Hat OpenShift is the complete car. It's a platform built on top of Kubernetes, providing a more streamlined and developer-friendly experience. It bundles Kubernetes with other open-source tools to simplify the process of building, deploying, and running applications.

OpenShift makes working with Kubernetes a lot easier by providing a layer of abstraction over Kubernetes that removes a good deal of Kubernetes's operational complexity from the day-to-day developer experience.

The Architecture

An OpenShift cluster is made up of two main types of machines, or 'nodes': Master Nodes and Worker Nodes. Think of it like a construction site. The master nodes are the project managers, and the worker nodes are the crew actually building things.

Master Nodes: These are the brains of the cluster. They make all the decisions, like where to run applications, how to respond if something fails, and how to manage access. They coordinate all the activity in the cluster.

Worker Nodes: These are the workhorses. They are where your applications actually run. The master nodes assign tasks to the worker nodes, which then run the application containers.

Core Application Concepts

To run an application on OpenShift, you'll work with a few key building blocks. These components define how your application is deployed, networked, and exposed to users.

Pod

noun

The smallest and simplest unit in the Kubernetes object model that you create or deploy. A Pod represents a single instance of a running process in a cluster and can contain one or more containers, such as Docker containers.

A Service is an abstraction that defines a logical set of Pods and a policy by which to access them. Pods are temporary; they can be created and destroyed. A Service provides a stable IP address and DNS name, so other parts of your application can reliably connect to the right Pods, even if they get replaced. Think of it as a permanent mailing address that forwards mail to wherever you're currently living.

Finally, a Route is an OpenShift-specific concept that exposes a Service to the outside world. It gives your application a public URL, so users can access it from their web browsers. It acts as the front door, directing incoming traffic to the correct Service.

Organizing Your Workload

A single OpenShift cluster might be used by many different teams or for many different applications. To keep things organized and isolated, OpenShift uses Projects.

A Project is essentially a Kubernetes namespace with added features. It provides a scope for names. This means you can have an application named 'database' in Project A and another application named 'database' in Project B without any conflict. Projects are the primary way to isolate teams and their resources from each other, ensuring that one team's work doesn't accidentally interfere with another's.

Lesson image

You can manage all these components in two main ways: through the OpenShift Web Console or the command-line interface (CLI).

Web Console: A user-friendly, browser-based interface that provides a visual overview of your cluster. You can see your projects, manage applications, and view logs and metrics.

OpenShift CLI (oc): A powerful command-line tool for interacting with your cluster. It allows you to script and automate tasks, giving you fine-grained control over every aspect of your OpenShift environment. Most experienced administrators and developers spend a lot of time with the oc command.

Now that you understand the basic architecture and components, you're ready to start exploring how to deploy and manage applications on the platform.

Quiz Questions 1/5

What is the primary relationship between Red Hat OpenShift and Kubernetes?

Quiz Questions 2/5

In an OpenShift cluster, which component is responsible for managing the cluster and scheduling applications to run?