Example service – Redis

We will create an example service within Kubernetes, to show you how you can connect to services, and use them to architect your code. Redis (https://redis.io) is a super-flexible data store that you may already be familiar with, and it is easy to use from both Python and Node.js.

Redis is already available as a container, and it is easily found on the Docker Hub (https://hub.docker.com/) as a container image. There are several options available, with the relevant tags listed on the Docker Hub web page:

We can use this image with the kubectl run command to create a deployment, and then with the kubectl expose command ...

Get Kubernetes for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.