Published on
Exercise 1

Pod issue

Authors
  • Name
    Twitter

Your favourite OpenShift admin just went on mat leave, and you are now in charge of your team OpenShift cluster. You have some user that complain they can't play Pacman any more during their lunch break, as the pod is not starting.

Let's get started!

Table of Contents

What's going on?

Navigate to your project (exercise01-userXX), make sure you are in the developer perspective, and pick the "Topology view" from the left panel. The deployment is in light blue, so something is not right, we want this nice dark blue deployment color

topology

You may try and identify the issue. Poke around, click, explore. If no luck after a few minutes, then check the hints below as needed.

Hints

Hint 1

How do I see a deployment overview?

You can get a quick overview of the deployment situation by clicking on the deployment icon. You can probably see some early indications of the problem.

hint1

Hint 2

How do I check the deployment events?

You can check the deployment events.

hint2

In this case, nothing useful (sorry). It's actually a pod issue

Hint 3

How to check pod logs?

Let's check some pod information, for example, the pod logs.

hint3

Well, nothing particularly useful today, and that's because the pod is not even starting, so there is no process running inside the pod, no logs being output.

Hint 4

How to check pod events?

Still in the Pods section, let's have a look at the Event.

hint4

Ok, something useful now. The container image is not being pulled. The error message indicate it's an authentication issue. I can guarantee you everything is fine authentication wise, yet the message makes sense once you find the root cause. Check very carefully the message, maybe there is a typo somewhere that may explain everything?

Hint 5

How to edit a Yaml CRD?

At this stage, you should understand what's going on, and have an idea on how to fix it. In the console, you should head over the Yaml section of your deployment and update the yaml. Give it a try, and if needed, head over the solution.

Solution

Ok, the issue is that there is a typo in the container image. OpenShift tries to pull an image that does not exist publicly. It assumes the image must be private, and therefore trough an image around authentication. In reality, the image does not exists because of the typo. Let's fix that.

You could fix the pod custom resource definition, however, if the deployment is scaled down to 0, then back to 1, or if the pod is deleted, the deployment will recreate the pod definition with ... the wrong container image name again.

So really, you need to fix the deployment definition. One way to achieve that is with the command line using oc, for example with the command oc set image ... but in this case, we are going to edit the yaml file directly from the OpenShift console. Everything is explained in the next two screenshots

solution1
solution2

Your pod should now start correctly. Have a play at Pacman, try to hit a high score, read the next section, and move on to the next exercise

solution3

Did you know?

Administrator perspective

You can also switch to the administrator, and have access to your deployment and / or pod information under the workload menu.

duk3

Deployment definition Yaml

Errors may be visible when inspecting the deployment definition Yaml. Have a look!

duk1

Pod definition Yaml

Similarly, errors may be visible when inspecting the pod definition Yaml. Have a look!

duk2

Take away

When a pod doesn't start messages may appear in various place worth checking

  • Deployment's Event
  • Deployment's Yaml (at the bottom)
  • Pod's Event
  • Pod's log (at the bottom)
  • Pod's Yaml
  • other places we will see in this workshop