Skip to content

Instantly share code, notes, and snippets.

@antonmry
Created May 21, 2016 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonmry/91394adc7dec2e816c525c1f655f5018 to your computer and use it in GitHub Desktop.
Save antonmry/91394adc7dec2e816c525c1f655f5018 to your computer and use it in GitHub Desktop.
RestComm & Kubernetes with port ranges
apiVersion: v1
kind: ReplicationController
metadata:
name: restcomm-core-controller
spec:
replicas: 1
selector:
app: restcomm-core
template:
metadata:
annotations:
portrange.alpha.kubernetes.io/port-end-sip: "5064"
portrange.alpha.kubernetes.io/port-end-rtp: "65050"
labels:
app: restcomm-core
spec:
containers:
- name: restcomm-core
image: restcomm/restcomm:stable
ports:
- name: http
containerPort: 80
protocol: TCP
- name: https
containerPort: 443
protocol: TCP
- name: tcp9990
containerPort: 9990
protocol: TCP
- name: sip
containerPort: 5060
protocol: TCP
- name: sip-udp
containerPort: 5060
protocol: UDP
- name: rtp
containerPort: 65000
protocol: UDP
env:
- name: ENVCONFURL
value: https://raw.githubusercontent.com/RestComm/Restcomm-Docker/master/scripts/restcomm_env_locally.sh
- name: STATIC_ADDRESS
value: 172.20.34.63
- name: MEDIASERVER_LOWEST_PORT
value: "65000"
- name: MEDIASERVER_HIGHEST_PORT
value: "65004"
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "restcomm-service",
"annotations": {
"portrange.alpha.kubernetes.io/port-end-sip": "5064",
"portrange.alpha.kubernetes.io/port-end-rtp": "65050"
}
},
"spec": {
"selector": {
"app": "restcomm-core"
},
"ports": [
{
"name": "rtp",
"protocol": "UDP",
"port": 65000,
"targetPort": 65000
},
{
"name": "sip",
"protocol": "TCP",
"port": 5060,
"targetPort": 5060
},
{
"name": "http",
"protocol": "TCP",
"port": 80,
"targetPort": 80
},
{
"name": "https",
"protocol": "TCP",
"port": 443,
"targetPort": 443
},
{
"name": "tcp9990",
"protocol": "TCP",
"port": 9990,
"targetPort": 9990
},
{
"name": "sip-udp",
"protocol": "UDP",
"port": 5060,
"targetPort": 5060
},
{
"name": "sip-tls",
"protocol": "UDP",
"port": 5061,
"targetPort": 5061
}
],
"externalIPs" : [
"172.20.34.63"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment