Kubernetes Service Manifest: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:


* [[Kubernetes_Service_Concepts#Service_Manifest|Service Concepts]]
* [[Kubernetes_Service_Concepts#Service_Manifest|Service Concepts]]
=Example=


=Example=
=Example=

Revision as of 23:56, 11 November 2019

External

Internal

Example

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