mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
76 lines
1.8 KiB
Plaintext
76 lines
1.8 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * networking/using-sctp.adoc
|
|
|
|
:_mod-docs-content-type: REFERENCE
|
|
[id="nw-sctp-about_{context}"]
|
|
= Support for SCTP on {product-title}
|
|
|
|
As a cluster administrator, you can enable SCTP on the hosts in the cluster. On {op-system-first}, the SCTP module is disabled by default.
|
|
|
|
SCTP is a reliable message based protocol that runs on top of an IP network.
|
|
|
|
When enabled, you can use SCTP as a protocol with pods, services, and network policy.
|
|
A `Service` object must be defined with the `type` parameter set to either the `ClusterIP` or `NodePort` value.
|
|
|
|
[id="example_configurations_{context}"]
|
|
== Example configurations using SCTP protocol
|
|
|
|
You can configure a pod or service to use SCTP by setting the `protocol` parameter to the `SCTP` value in the pod or service object.
|
|
|
|
In the following example, a pod is configured to use SCTP:
|
|
|
|
[source,yaml]
|
|
----
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
namespace: project1
|
|
name: example-pod
|
|
spec:
|
|
containers:
|
|
- name: example-pod
|
|
...
|
|
ports:
|
|
- containerPort: 30100
|
|
name: sctpserver
|
|
protocol: SCTP
|
|
----
|
|
|
|
In the following example, a service is configured to use SCTP:
|
|
|
|
[source,yaml]
|
|
----
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
namespace: project1
|
|
name: sctpserver
|
|
spec:
|
|
...
|
|
ports:
|
|
- name: sctpserver
|
|
protocol: SCTP
|
|
port: 30100
|
|
targetPort: 30100
|
|
type: ClusterIP
|
|
----
|
|
|
|
In the following example, a `NetworkPolicy` object is configured to apply to SCTP network traffic on port `80` from any pods with a specific label:
|
|
|
|
[source,yaml]
|
|
----
|
|
kind: NetworkPolicy
|
|
apiVersion: networking.k8s.io/v1
|
|
metadata:
|
|
name: allow-sctp-on-http
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
role: web
|
|
ingress:
|
|
- ports:
|
|
- protocol: SCTP
|
|
port: 80
|
|
----
|