k8s

apiVersion: v1
kind: Service
metadata:
  name: srs
  namespace: test
spec:
  selector:
    app: srs
  ports:
  - port: 1985
    nodePort: 30045
    name: console
  - port: 1935
    nodePort: 30043
    name: rmtp
  - port: 8080
    nodePort: 30044
    name: stream
  type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: srs
  namespace: test
  labels:
    app: srs
spec:
  selector:
    matchLabels:
      app: srs
  replicas: 1
  template:
    metadata:
      labels:
        app: srs
    spec:
      containers:
      - name: srs
        image: registry.cn-hangzhou.aliyuncs.com/ossrs/srs:3
        ports:
        - name: stream
          containerPort: 8080
        - name: rtmp 
          containerPort: 1935
        - name: console 
          containerPort: 1985

使用:

推流地址:

RTMP: rtmp://172.16.0.21:30043/live/xxx

播放地址:

http://172.16.0.21:30044/live/xxx.flv
http://172.16.0.21:30044/live/xxx.m3u8

控制台信息:

http://172.16.0.21:30045/console/ng_index.html#/summaries?host=172.16.0.21&port=30045

发表评论

您的电子邮箱地址不会被公开。

Captcha Code