2022-05-11:k8s安装easydarwin流媒体服务器,yaml如何写?

答案2022-05-11:

yaml如下:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: easydarwin
  name: easydarwin
  namespace: moonfdd
spec:
  replicas: 1
  selector:
    matchLabels:
      app: easydarwin
  template:
    metadata:
      labels:
        app: easydarwin
    spec:
      containers:
        - image: justtin/easydarwin
          imagePullPolicy: IfNotPresent
          name: easydarwin
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: easydarwin
  name: easydarwin
  namespace: moonfdd
spec:
  ports:
    - name: rtsp
      port: 554
      protocol: TCP
      targetPort: 554
      nodePort: 10554
    - name: ww
      port: 80
      protocol: TCP
      targetPort: 80
  selector:
    app: easydarwin
  type: NodePort

ffmpeg推流:

ffmpeg.exe -re -i 俄罗斯.MP4 -vcodec copy -acodec copy -rtsp_transport tcp -f rtsp rtsp://192.168.204.13:10554/test1.sdp 

结果如下: 在这里插入图片描述 在这里插入图片描述