JayD
JayD

Reputation: 986

How to have more than one instance of the kubernetes service object itself?

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

Upvotes: 0

Views: 121

Answers (1)

coderanger
coderanger

Reputation: 54251

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.

Upvotes: 2

Related Questions