Introduction to Services

Get introduced to another fundamental Kubernetes object, i.e., Services.

We'll cover the following

Introduction to Services

Kubernetes treats Pods as ephemeral objects and deletes them when any of the following events occur:

  • Scale-down operations

  • Rolling updates

  • Rollbacks

  • Failures

This means they’re unreliable, and apps can’t rely on them being there to respond to requests. Fortunately, Kubernetes has a solution — Service objects sit in front of one or more identical Pods and expose them via a reliable DNS name, IP address, and port.

The following figure shows a client connecting to an application via a Service called app1. The client connects to the name or IP of the Service, and the Service forwards requests to the application Pods behind it.

Get hands-on with 1400+ tech skills courses.