Using Service Types in Kubernetes

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Kubernetes Services provide a great way for containers to communicate. In this lab, you will practice your knowledge of Kubernetes Services by selecting and implementing the appropriate Service types to fulfill specific use cases.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Publish an Application Internally within the Cluster Network

There is a deployment called desert-terrapin in the default Namespace that needs to be exposed within the cluster network. The relevant Pods listen on port 80 and have the label app=desert-terrapin. Expose the Service on port 80 as well.

Create the appropriate Service with the name desert-terrapin-svc.

Use a Service to Publish an Application Externally

The sea-turtle deployment in the default Namespace needs to be exposed to users outside the cluster.

The application’s Pods listen on port 80 and all have the label app=sea-turtle. Use port 30080 on all of the cluster nodes to make the Service available outside the cluster. (Hint: You can specify the external port using the nodePort field.)

Create the appropriate Service with the name sea-turtle-svc.

Additional Resources

Welcome to TortoiseCorp! We work to build the future of fruit, lettuce, and heat lamps.

We have two applications in our Kubernetes cluster that need to be exposed. Your task is to select the appropriate Service type based upon the provided criteria and create the Service.

Feel free to refer to the Kubernetes documentation for examples of various Service types and more information.

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?