Chapter 2. Introduction to containers and orchestration with Kubernetes 27
Services
Kubernetes Service is one more REST object and is similar to a pod. However, this service is 
designed as an abstraction for logical set of pods and associated policy to access those sets. 
This abstraction enables cloud-based applications to be decoupled from its endpoints. A 
Service definition is posted to API server to create a Service instance with or without Selector 
definition. Cloud native applications take advantage of the API server to query and discover 
Service endpoints, along with notification for changes in pods that are associated with a 
service. 
Service with selector
Service with selector includes the following features:
/SM590000An object is created with cluster IP, which is assigned by Kubernetes to new a Service 
object
/SM590000Automatically creates endpoints
/SM590000Controller scans and find this service with the reference of Service selector
Service without selector
Service without selector includes the following features:
/SM590000Maps with objects from external clusters 
/SM590000Maps with objects from different namespace 
/SM590000During phased migration, section of objects from be run as a backend process 
/SM590000Endpoint objects are not created automatically (requires manual mapping of service with 
IP and ports)
Storage volume 
Kubernetes volume is an abstraction to address two important aspects, such as data 
persistency and sharing. Data persistency helps to retain the most updated data set after a 
container is stopped or crashed. Data sharing can be an essential requirement if multiple 
containers are hosted in a pod.
A Kubernetes volume is persistent until the enclosing pod is available. A pod can select or 
move volumes from the following persistent block level storage devices:
/SM590000awsElasticBlockStore
/SM590000azureDisk
/SM590000azureFile
/SM590000cephfs
/SM590000cinder
/SM590000configMap
/SM590000csi
/SM590000downwardAPI
/SM590000emptyDir
/SM590000fc (Fibre Channel)
/SM590000flexVolume
/SM590000flocker
/SM590000gcePersistentDisk
/SM590000gitRepo (deprecated)
/SM590000glusterfs
/SM590000hostPath
/SM590000iscsi
/SM590000local
/SM590000nfs