Enabling SCTP in Openshift Container Platform 4
Issue
Making use of SCTP protocol such as in the following deployment requires additional steps for it to fully work.
apiVersion: v1
kind: Pod
metadata:
namespace: sctpdemo
name: sctpserver
labels:
app: sctpserver
spec:
containers:
- name: sctpserver
image: fedora:31
command: ["/bin/sh", "-c"]
args:
["dnf install -y lksctp-tools && sctp_test -H localhost -P 30100 -l"]
ports:
- containerPort: 30100
name: sctpserver
protocol: SCTP
---
apiVersion: v1
kind: Service
metadata:
namespace: sctpdemo
name: sctpserver
labels:
app: sctpserver
spec:
selector:
app: sctpserver
ports:
- name: sctpserver
protocol: SCTP
port: 30100
targetPort: 30100
type: ClusterIP
In order to expose SCTP port(s), the protocol field of the relevant port must be set to SCTP.
ports:
- containerPort: 30100
name: sctpserver
protocol: SCTP
Environment
OpenShift Container Platform >=4.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.