Services and Deployments in Docker Kubernetes Service

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Services and Deployments, when used together, are a great way to build and manage applications in Kubernetes. In this lab, you will have the opportunity to build an application around deployments and services in a Docker Kubernetes Service cluster. This will provide hands-on experience in architecting robust Kubernetes applications.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create a Deployment to Manage the Application

Create a deployment that spins up 3 replica pods running the nginx:1.19.1 image. The pods will need to publish a containerPort of 80 to expose Nginx externally.

Create a service to expose the application externally.

Create a service that will expose the deployment’s pods as an external service accessible by applications outside the cluster. The service should map to a targetPort of 80. Use a nodePort of 32768 to expose the service externally.

Additional Resources

Your company recently purchased Docker Enterprise and is experimenting with using Docker Kubernetes Service to orchestrate some applications. They would like to create a simple Nginx server with three replica instances and expose it externally.

Your task is to build a deployment with 3 replicas in the Docker Enterprise Kubernetes cluster. You will then need to expose these containers externally on port 32768 using a service.

Note: Access UCP Manager at https://<UCP MANAGER PUBLIC IP>. Since we use a self-signed certificate, choose to proceed to the site. Log in to the UCP using the username admin and the randomly-generated password associated with any of the lab servers. The worker will be tested on http at the lab's end.

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?