OpenShift Service Definition: Difference between revisions
Jump to navigation
Jump to search
Line 18: | Line 18: | ||
app: gogs | app: gogs | ||
name: gogs | name: gogs | ||
spec: | '''spec''': | ||
ports: | ports: | ||
- name: web | - name: web | ||
Line 24: | Line 24: | ||
protocol: TCP | protocol: TCP | ||
targetPort: 3000 | targetPort: 3000 | ||
selector: | '''selector''': | ||
<font color=SandyBrown>pod_selector_label_name_1</font>: <font color=SandyBrown> pod_selector_value_1</font> | |||
<font color=SandyBrown>pod_selector_label_name_2</font>: <font color=SandyBrown> pod_selector_value_2</font> | |||
sessionAffinity: None | sessionAffinity: None | ||
type: ClusterIP | type: ClusterIP | ||
=Elements= | |||
==spec== | |||
===selector=== |
Revision as of 08:39, 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: pod_selector_label_name_1: pod_selector_value_1 pod_selector_label_name_2: pod_selector_value_2 sessionAffinity: None type: ClusterIP