OpenShift Service Definition: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 10: Line 10:
=Example=
=Example=


<syntaxhighlight lang=yaml>
  apiVersion: v1
  apiVersion: v1
  kind: Service
  kind: Service
Line 30: Line 29:
   sessionAffinity: None
   sessionAffinity: None
   type: ClusterIP
   type: ClusterIP
</syntaxhighlight>

Revision as of 08:37, 9 December 2017

External

Internal

Example

apiVersion: v1
kind: Service
metadata:
  annotations:
    description: The Gogs server's http port
  labels:
    app: gogs
  name: gogs
spec:
  ports:
  - name: web
    port: 3000
    protocol: TCP
    targetPort: 3000
  selector:
    app: gogs
    deploymentconfig: gogs
  sessionAffinity: None
  type: ClusterIP