Is it possible to have more than one instance of the actual Service
object created in deployments that actually manages the access to pods (containers) and what happens if the actual service object itself is somehow deleted or destroyed?
This is the service object specified in a deployment YAML file:
kind: Service
apiVersion: v1
metadata:
name: my-service
spec:
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376
The Service object only exists as an abstraction within the Kubernetes API. The actual implementation is distributed across your entire cluster, generally in the form of iptables rules created by kube-proxy on every node.