Difficulty: Introduction
Estimated Time: 20 minutes

Container Registries on Kubernetes

As a developer of container and Kubernetes solutions there is often a need to publish containers to a private registry. When we are prototyping or testing its handy to setup a local registry that just you or a small group can leverage. Kubernetes is ideal for hosting this solution.

The Registry is a stateless, highly scalable server side application that stores and lets you distribute container images. The Registry is open-source, under the permissive Apache license.

To learn how the registry works, you will build, push and pull a real application with the registry. The application is a Breast Cancer Mitosis Detector provided by the IBM. IBM has over 40 open source projects covering various deep learning models.

Key Features

  • Follows the Docker Registry HTTP API V2
  • Accepts pushed containers
  • Fulfills container requests
  • Images persisted to backing PersistentVolume
  • Easily hosted on Kubernetes

You will learn how:

  • to install a private container registry on Kubernetes
  • to install a web interface to reveal the contents of the registry.

Lessons Learned

Generally there are three ways to interact with container registeries.

  1. Public registries like DockerHub, Quay.io, gcr.io
  2. Private team registries that are within you organization, often hosted by your cloud provider
  3. Private registries that you or your team may be using on a local or private Kubernetes cluster or namespace.

This tutorial gives you a leg up for leveraging personal and local registeries. This is ideal when you are prototyping or rapidly developing and testing a solution locally. Knowing how to quickly setup and use a private container is another technique you can pull out of your Kubernetes toolbox.

With these steps you have learned:

  • how to install a private container on Kubernetes,
  • how to install web interface to list the registry contents

References

Homage

Lost friend and father, Bill Becker. Male Breast Cancer Awareness Week is the third week of October.


No Fluff Just Stuff

For a deeper understanding of these topics and more join me, Jonathan Johnson, for a transcendent experience on the No Fluff Just Stuff Software Symposium Tour.

Registries

Step 1 of 5

Your Kubernetes Cluster

As you see, your Kubernetes cluster is started. Verify it's ready for your use.

kubectl version && kubectl cluster-info && kubectl get nodes

Verify the Kubernetes cluster is empty.

kubectl get deployments,pods,services

The Helm package manager used for installing applications on Kubernetes is also available.

helm version

Kubernetes Dashboard

As an administrator, you can control the cluster with the kubectl CLI tool. You can also use the Kubernetes Dashboard. Because the dashboard can be accessed publicly, it is protected and requires the secret access token to sign in. Because you have administration access to this cluster, copy the token from this secret.

export TOKEN=$(kubectl describe secret $(kubectl get secret | awk '/^dashboard-token-/{print $1}') | awk '$1=="token:"{print $2}') && echo -e "\n--- Copy and paste this token for dashboard access --\n$TOKEN\n---"

To access the dashboard, click on the Kubernetes Dashboard tab above the command line or from this link: https://[[HOST_SUBDOMAIN]]-30000-[[KATACODA_HOST]].environments.katacoda.com/. At the sign in prompt select Token and paste in the token, you copied a moment ago.

For publicly exposed Kubernetes clusters always lock any kind of Kubernetes administration access including access to the dashboard.

Terminal
Kubernetes Dashboard
Registry
Cancer Detector