Exposing Kubernetes Pods Using Services

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Kubernetes Services are a great way to combine Kubernetes networking with the dynamic and often automated nature of Kubernetes applications. In this lab, you will use Services to expose existing Kubernetes Pods. This will allow you to practice your skills with Kubernetes Services.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Expose the Pods from the User-db Deployment as an Internal Service

Find the user-db deployment in the default namespace. Create a Service that will expose its Pods to other components within the cluster. This Service should not be accessible from outside the cluster.

Expose the Pods from the Web-frontend Deployment as an External Service

Locate the web-frontend deployment in the default namespace as well. Create a Service that will expose its Pods on port 30080 of each cluster node.

Additional Resources

Your company, Beebox, is in the process of building a microservice application for Kubernetes.

They have a backend database of user information and a web frontend, both of which are managed using deployments. Both of these applications are also still being developed and are currently just using simple Nginx containers for testing. You have been asked to set up appropriate Kubernetes Services for these application components.

The user database is a backend service that should only be accessible by other components within the cluster. The web frontend needs to be accessible by users outside the cluster. Locate the existing deployments and create the necessary Services to expose them. There is an existing Pod called busybox which you can use to test Services.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?