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 thenginx:1.19.1
image. The pods will need to publish acontainerPort
of80
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
of80
. Use anodePort
of32768
to expose the service externally.