Kubernetes Service Manifest

From NovaOrdis Knowledge Base
Revision as of 21:56, 19 September 2020 by Ovidiu (talk | contribs) (→‎Example)
Jump to navigation Jump to search

External

Internal

Example

apiVersion: v1
kind: Service
metadata:
  name: blue
  labels:
    size: large
spec:
  type: ClusterIP
  selector:
    function: front-end # Label selector, the service is looking for
                        # pods with the label "function=front-end"
  ports:
  - port: 80
    targetPort: 8080
    protocol: TP

.spec Elements

type

Optional element. If not specified, it is assumed to be "ClusterIP".

publishNotReadyAddresses