OpenShift Route Definition: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
* [[OpenShift_Concepts#Route|OpenShift Concepts]] | * [[OpenShift_Concepts#Route|OpenShift Concepts]] | ||
* [[OpenShift_Configuration#Definitions|OpenShift Definitions]] | * [[OpenShift_Configuration#Definitions|OpenShift Definitions]] | ||
* [[OpenShift_Route_Operations#Overview|Route Operations]] | |||
= | =Examples= | ||
==Unsecured Route== | |||
<syntaxhighlight lang=yaml> | |||
apiVersion: v1 | |||
kind: Route | |||
metadata: | |||
annotations: | |||
description: Route for gogs's http service. | |||
name: gogs | |||
labels: | |||
app: gogs | |||
spec: | |||
to: | |||
kind: Service | |||
name: gogs | |||
</syntaxhighlight> | |||
<syntaxhighlight lang=yaml> | |||
apiVersion: v1 | |||
kind: Route | |||
metadata: | |||
name: route-unsecured | |||
spec: | |||
host: www.example.com | |||
to: | |||
kind: Service | |||
name: service-name | |||
</syntaxhighlight> | |||
==Secured Edge-Terminated Route== | |||
<syntaxhighlight lang=yaml> | |||
apiVersion: v1 | |||
kind: Route | |||
metadata: | |||
name: route-edge-secured | |||
spec: | |||
host: www.example.com | |||
to: | |||
kind: Service | |||
name: service-name | |||
tls: | |||
termination: edge | |||
key: |- | |||
BEGIN PRIVATE KEY | |||
[...] | |||
END PRIVATE KEY | |||
certificate: |- | |||
BEGIN CERTIFICATE | |||
[...] | |||
END CERTIFICATE | |||
caCertificate: |- | |||
BEGIN CERTIFICATE | |||
[...] | |||
END | |||
</syntaxhighlight> | |||
==Passthrough-Terminated Route== | |||
<syntaxhighlight lang=yaml> | |||
apiVersion: v1 | |||
kind: Route | |||
metadata: | |||
name: route-passthrough-secured | |||
spec: | |||
host: www.example.com | |||
to: | |||
kind: Service | |||
name: service-name | |||
tls: | |||
termination: passthrough | |||
</syntaxhighlight> | |||
==Re-encryption-Terminated Route== | |||
<syntaxhighlight lang=yaml> | <syntaxhighlight lang=yaml> | ||
apiVersion: v1 | |||
kind: Route | |||
metadata: | |||
name: route-pt-secured | |||
spec: | |||
host: www.example.com | |||
to: | |||
kind: Service | |||
name: service-name | |||
tls: | |||
termination: reencrypt | |||
key: [as in edge termination] | |||
certificate: [as in edge termination] | |||
caCertificate: [as in edge termination] | |||
destinationCaCertificate: |- | |||
BEGIN CERTIFICATE | |||
[...] | |||
END CERTIFICATE | |||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 20:54, 27 November 2017
External
Internal
Examples
Unsecured Route
apiVersion: v1
kind: Route
metadata:
annotations:
description: Route for gogs's http service.
name: gogs
labels:
app: gogs
spec:
to:
kind: Service
name: gogs
apiVersion: v1
kind: Route
metadata:
name: route-unsecured
spec:
host: www.example.com
to:
kind: Service
name: service-name
Secured Edge-Terminated Route
apiVersion: v1
kind: Route
metadata:
name: route-edge-secured
spec:
host: www.example.com
to:
kind: Service
name: service-name
tls:
termination: edge
key: |-
BEGIN PRIVATE KEY
[...]
END PRIVATE KEY
certificate: |-
BEGIN CERTIFICATE
[...]
END CERTIFICATE
caCertificate: |-
BEGIN CERTIFICATE
[...]
END
Passthrough-Terminated Route
apiVersion: v1
kind: Route
metadata:
name: route-passthrough-secured
spec:
host: www.example.com
to:
kind: Service
name: service-name
tls:
termination: passthrough
Re-encryption-Terminated Route
apiVersion: v1
kind: Route
metadata:
name: route-pt-secured
spec:
host: www.example.com
to:
kind: Service
name: service-name
tls:
termination: reencrypt
key: [as in edge termination]
certificate: [as in edge termination]
caCertificate: [as in edge termination]
destinationCaCertificate: |-
BEGIN CERTIFICATE
[...]
END CERTIFICATE