Skip to Content
OpenShift for Developers, 2nd Edition
book

OpenShift for Developers, 2nd Edition

by Joshua Wood, Brian Tannous
September 2021
Beginner to intermediate
145 pages
3h 14m
English
O'Reilly Media, Inc.
Content preview from OpenShift for Developers, 2nd Edition

Chapter 9. Monitoring and Managing Applications on OpenShift

You’ve made an application with multiple components, and you’ve automated its build and deployment with a repeatable pipeline. You’ve set up OpenShift to watch your applications and take action on your behalf when they need to be scaled in response to demand or restarted in response to their going sideways. You’re in a good position to focus on your application’s features and code, because when everything goes right, you commit changes and OpenShift handles the rest.

But no one defies Murphy’s Law forever. Eventually you’ll need to troubleshoot your application, or its deployment, by examining its moving parts, available cluster resources, and the logs that record build, deployment, and application events. This chapter introduces the most common OpenShift tools for examining running resources, from listing them to check their basic status, to walking in your application’s shoes by connecting to it and interactively running commands inside its container.

Listing and Detailing Resources

The oc tool is the simplest form of monitoring OpenShift resources. There is a general pattern for addressing a resource in an oc command line. You specify the action you want to do, the kind of object you want to do it to, and the name of that specific object: oc <verb> <kind> <name>. Specifying a kind but not a name refers to all the objects of that kind.

For example, to list all the objects of the Pod type running in the current project, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Kubernetes: Up and Running, 2nd Edition

Kubernetes: Up and Running, 2nd Edition

Brendan Burns, Joe Beda, Kelsey Hightower
Spring Microservices in Action, Second Edition

Spring Microservices in Action, Second Edition

John Carnell, Illary Huaylupo Sanchez

Publisher Resources

ISBN: 9781098103354Errata Page