
Learn how OpenShift serves administrator and application development teams, choose the right resources, and deploy applications using 15 common OpenShift resources and reusable templates.
Learn how OpenShift runs applications with container technology on a cluster, with control and data planes, and how developers deploy via rest api, cli, or dashboard.
Deploy applications to OpenShift with a single command using oc new-app. Experience starting a Jenkins server and accessing its dashboard to see the deployment in action.
Learn OpenShift 4 basics and beyond by installing Docker Desktop, covering 15 resource types from pods to templates, and following guided, hands-on commands, quizzes, and projects.
Developers learn to use the OpenShift CLI (OC) over the dashboard, automating tasks with shell scripts and CI jobs to deploy updates, start builds, and scale applications.
Navigate this course with options for all skill levels, from Docker and containers to OpenShift-specific topics, skipping modules as needed to suit your background.
Understand why this course focuses on OpenShift 4, as OpenShift 3 enters maintenance and extended life phases; learn step-by-step setup for OpenShift 4 on Windows and macOS.
Set up your development environment by installing Docker Desktop, creating a development OpenShift cluster, cloning the course Git repository, and using hosted accounts on GitLab or Quay.io.
Install Docker Desktop on macOS, covering Apple and Intel processors, download, install, and grant privileges, then verify with docker run hello-world before proceeding to the OpenShift installation intro.
Install Docker Desktop on Windows 10 Home by downloading the installer and granting admin privileges. Update the WSL 2 kernel, restart, and test docker run hello-world before OpenShift installation lesson.
Install Docker Desktop on Windows 10 Pro using Hyper-V, not WSL 2, then run a HelloWorld test and proceed to the OpenShift installation introductory lesson.
Learn how to set up your OpenShift environment with CodeReady Containers or the Developer Sandbox, compare requirements, and choose the right option for your OS.
Install a local OpenShift 4 cluster on Windows Pro with CodeReady containers. Sign up for Red Hat, download CRC, extract, install, paste pull secret, start CRC, and verify OC login.
Install OpenShift 4 on macOS using CodeReady Containers, meet system requirements, and configure the OpenShift cli by running crc setup and crc start, then login and verify operators.
Set up a hosted OpenShift environment with Red Hat's developer sandbox, create and verify a Red Hat account, and access the OpenShift console, choosing Windows or Mac OS setup paths.
download the oc tool for macOS and create an oc-command directory. move oc there, update your path in your startup file, and log in with the token and url.
Learn to install and configure the OpenShift CLI OC on Windows 10, including downloading, extracting, updating the path, and authenticating with a token via oc login.
Clone the labs git repository with git clone https://gitlab.com/practical-openshift/labs.git and use the official Git book to refresh or learn Git before installation.
Sign up for quay.io and gitlab.com to access image registries and Git repositories for OpenShift labs, then create credentials.env from credentials_template.env and keep credentials secret to start the course.
In this lesson you'll learn an easy way to think about containers which will set you up for success on the OpenShift platform.
Run a container with docker run hello-world to see how Docker pulls the image from Docker hub and starts it via the Docker daemon.
Learn what a container image is and how to build, store, and run it using Docker, Dockerfiles, and container registries in OpenShift 4.
Build a container image from a dockerfile and source files using docker build, learn how each instruction creates a new layer from a base image, verify with docker images.
Learn how to tag a container image with meaningful names using docker build -t, understand repository and tag fields, and manage latest and custom tags for efficient OpenShift workflows.
Run the hello-world api server with docker run, verify running containers with docker ps, and stop the container using ctrl-c or docker kill by container id.
Learn how to expose a container port and forward traffic from the host to the pod using Docker -p, with practical examples like 8080:8080 and verifying with curl localhost:8080.
Master dockerfile instructions, starting with the from instruction, and learn how base images power container builds, then search Docker Hub for suitable images like golang alpine.
Copy files from your host into a new container using the copy command after selecting a base image with the from instruction, creating a filesystem layer for code and resources.
Set default environment variables in the Dockerfile with the ENV instruction, and learn how to override them before running your container to customize the Hello World app’s HTTP responses.
Master how the run command in a Dockerfile starts a command in the latest intermediate container and saves a new layer, supporting OpenShift permissions and installing dependencies.
Learn how the expose instruction in a Dockerfile serves as documentation, not exposing a port on the host, and how OpenShift concepts are needed to actually expose ports.
Set a container's runtime command with the CMD instruction; shell form starts a shell, while exec form runs directly without a shell for better efficiency.
Learn a foolproof process for developing Docker containers by crafting Dockerfiles with from, env, run, expose, and cmd, then build, test, and prepare for OpenShift.
Discover how to navigate OpenShift 4 as a developer by managing users, organizing applications into projects, authenticating via the command line, and applying quotas to guarantee resource availability.
Log in to OpenShift with oc login, use the -u flow for developer on code-ready containers, then verify the user with oc whoami and log out with oc logout.
OpenShift uses projects to group related resources, such as a website's UI and server, sharing quotas. Create, switch, and list projects with oc project, oc new-project, and oc projects.
OpenShift runs containers inside pods to manage multiple containers, including sidecars, on the same worker node. Learn to write pod definitions in YAML and start and stop pods.
Learn to access OpenShift's built-in pod documentation with oc explain, and discover kind, version, description, and common fields such as apiVersion, kind, metadata, and spec.
Explore using oc explain to reveal pod and spec field details, dive into the containers list and image field, and learn why pods are updated by deletion and recreation.
Learn to run a pod on OpenShift by executing oc create -f pods/pod.yaml. Then verify the pod status with oc get pods, ensuring it shows running.
Open a shell inside the running pod with oc rsh, then verify the Hello World server on localhost:8080 using wget. Use the in-container shell for debugging and testing the server.
Use the oc delete command with the pod resource type on the OpenShift REST API to stop a pod. Delete hello-world-pod and verify with oc get pod no resources found.
Watch real-time pod updates in OpenShift with oc get pods --watch. Learn to create pods from files and delete them, and identify the four lifecycle states: pending, creating, running, terminating.
Explore YAML basics, syntax, objects and lists, and why YAML is the defacto standard for storing Kubernetes and OpenShift resource definitions, with comparisons to JSON.
Examine pod definitions in yaml, review top-level keys like apiVersion, kind, metadata, and spec, and learn to configure containers and environment variables to run multiple containers in OpenShift.
Use oc explain to access OpenShift pod documentation and explore YAML properties, following paths such as spec.containers.env, and interpret array fields like name and value for deployment configs.
Deployment configs define the pod template and manage deploying new images or configuration changes, with replicas controlling pod counts and automating deployments and lifecycle hooks in OpenShift.
Learn to create a deployment config from an image tag using oc new-app, producing an image stream tag, a deployment config, and a service with the hello-world image.
Clean up OpenShift resources one by one by deleting DeploymentConfigs, services, and ImageStreamTag with oc delete, then verify with oc status and oc get.
Learn to clean up OpenShift resources efficiently by using a label selector with OC delete, leveraging the app=hello-world label to remove pods, replication controllers, and deployment configs.
Learn to name deployment configs in OpenShift 4 using the --name option with oc new app, and manage resources with oc status, oc describe, and label-based deletes.
Deploy an application from a Git repository using OpenShift 4, building via a Dockerfile, creating image streams and a deployment config with OC new-app.
Learn how replication controllers manage pod replicas through deployment configs, using oc get -o yaml to inspect dc/hello-world, and how traffic shifts to new controllers.
Explore deployment configs, rollout, and rollback in OpenShift using oc commands, learning how to roll out new versions with zero downtime and revert to previous versions when needed.
Expose pods with a single service to provide internal OpenShift network access. Learn how a service uses a proxy, a selector, a virtual IP, and ports to route traffic.
Learn to create a service for a pod with oc expose, expose port 8080, verify with oc status, and validate internal pod communication using a second pod and wget.
Learn how to access a service in OpenShift by using environment variables inside a pod, including locating 8080 TCP address and port, and using variable substitution to make requests.
Expose your application outside the cluster by creating a route with oc expose, deploy hello-world with oc new-app, and verify access with curl to the route URL.
OpenShift route definitions expose an external DNS name to reach a service. A route's spec includes host, targetPort, and a to field with kind, name, and weight.
Test your knowledge of Services and Routes in this hands-on exercise.
Store ConfigMaps in OpenShift to hold configuration data separate from pods, enabling environment-specific values and centralized configuration across multiple pods.
Create a ConfigMap from the command line with oc create configmap using from literal and the MESSAGE key, verify with oc get -o yaml, then use it in a pod.
Consume a config map in a deployment config by using OC set env to inject the map value as an environment variable, then test with curl.
Learn how to create configmaps from files in OpenShift using --from-file, assign custom keys, update a deployment with oc set env, and verify the result via a route.
Learn to create a configmap from all files in a directory with oc create configmap --from-file, using the pods directory and then run oc get -o yaml to verify.
Explore OpenShift secrets, including opaque and service account token types, to securely store credentials, certificates, and API keys for authenticating to databases, private registries, and APIs.
Learn to create an opaque secret with OpenShift using oc create secret generic, from literal values, attach it to the Hello World image, and review base64 encoding.
Deploy hello-world, expose the service, and verify with curl. Inject a secret into the pod using oc set env dc/hello-world --from secret/message-secret, creating a secretKeyRef in the deployment YAML.
Explore image streams and image stream tags in OpenShift to manage container images and automatically deploy the latest versions via oc commands and deployment configurations.
Import an image stream with oc import image to create streams from a remote quay.io image, then reuse the stream with oc new app to deploy.
Learn to add image stream tags in OpenShift with oc tag, importing update-message and latest tags from quay.io/practicalopenshift/hello-world, then verify with oc get is and oc get is tag.
Build a private image from a simple dockerfile, tag it for quay.io with your registry username, push after docker login, and verify its private status on quay.io.
Run a private image in OpenShift by creating a docker registry secret, linking it to the default service account, and deploying with oc new app to verify via a route.
Updated to OpenShift 4
OpenShift is a very powerful platform that can help you run your applications securely and easily scale them up as demand rises. In this course you will learn to take advantage of all of this functionality and deploy any type of application to the OpenShift Container Platform. No prior experience in Docker, Kubernetes, or OpenShift is required. This course will take you from no knowledge of OpenShift to professional-level knowledge of OpenShift in just 6 hours.
What this course has that other courses don't have
This is the only course that covers all of the essential OpenShift resource types that you, the developer, need to do your job. Most other courses provide only a light introduction of a few of the OpenShift resource types. Instead, they focus on the DevOps aspects of OpenShift. This course covers 15 different types of OpenShift resources that you will need to do your job effectively. Don't settle for anything less!
Real-world experience
You have the opportunity in this course to get real-world experience with services like Quay and GitLab. These services are not required to complete the course, but you will get the most out of the course if you sign up for them and complete the related Labs. You can use both of these services for free for this course.
Reasons to Learn OpenShift
There are many great reasons for developers to learn OpenShift. Many top tech companies are adopting OpenShift as part of their cloud journey. Knowledge of OpenShift can help you get a job working on the OpenShift platform. The primary customers of OpenShift are large companies with lots of employees, so you have a good chance of finding a position to use your new OpenShift skills.
Developers may also wish to learn about OpenShift to leverage the Platform-as-a-Service (PaaS) OpenShift solutions offered by many public cloud vendors. This can help you to host your own OpenShift-based application to support a Software-as-a-Service (SaaS) startup or other freelance work.
Content and Overview
This course explains OpenShift's vocabulary in clear language, assuming no background in OpenShift. Lectures each have demos and walkthroughs to bring concepts from theory into practice.
Throughout the course, you will work with Git source control and a container registry to deploy applications to OpenShift. This enables you to test your skills in a realistic setting. Labs are hands-on and will require modifying configuration or light code patches in order to achieve the goal.
OpenShift Resource Types
Just like Kubernetes, developing applications on OpenShift requires knowledge of OpenShift resource types. OpenShift has custom resources, such as the DeploymentConfig, ReplicationController, and Template, that are not part of Kubernetes. To effectively create applications for OpenShift, you need to know how to work with these new OpenShift-specific types. Of the 15 resource types covered in this course, 10 are OpenShift-specific and only 5 are the same as Kubernetes.
Legal Notice
OpenShift and the OpenShift logo are trademarks or registered trademarks of Red Hat, Inc. in the United States and/or other countries. This course is not certified, accredited, affiliated with, nor endorsed by OpenShift or Red Hat, Inc.