Lab 2 - BYO Docker

Return to Workshop

Bring your own docker

It’s easy to get started with Kubernetes whether you’re using our app templates or bringing your existing docker assets. In this quick lab we will deploy an application using an exisiting docker image. Kubernetes will create an image stream for the image as well as deploy and manage containers based on that image. And we will dig into the details to show how all that works.

Let’s point Kubernetes to an existing built docker image

We can browse our project details with the command line

Try typing the following to see what is available to ‘get’:

$ oc get all

Now let’s look at what our image stream has in it:

$ oc get is
$ oc describe is/kubernetes-guestbook-go

An image stream can be used to automatically perform an action, such as updating a deployment, when a new image, in our case a new version of the guestbook image, is created.

The app is running in a pod, let’s look at that:

$ oc describe pods

We can see those details using the web console too

Let’s look at the image stream.

This shows a list of all image streams within the project.

You should see something similar to this:

Does this kubernetes-guestbook-go do anything?

Good catch, your service is running but there is no way for users to access it yet. We can fix that from the web console or the command line. You decide which you’d rather do from the steps below.

$ oc expose service kubernetes-guestbook-go

You can also create secured HTTPS routes, but that’s a topic for a more advanced workshop

Test out the guestbook webapp

Notice that in the web console overview, you now have a URL in the service box. There is no database setup, but you can see the webapp running by clicking the route you just exposed.

Click the link in the service box. You should see:

Let’s clean this up

Let’s clean up all this to get ready for the next lab:

$ oc delete all --all


In this lab you’ve deployed an example docker image, pulled from docker hub, into a pod running in Kubernetes. You exposed a route for clients to access that service via thier web browsers. And you learned how to get and describe resources using the command line and the web console. Hopefully, this basic lab also helped to get you familiar with using the CLI and navigating within the web console.

Workshop Details

Student ID

Return to Workshop