2022-05-13:k8s安装webrtc-streamer,yaml如何写?

Posted 福大大架构师每日一题

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了2022-05-13:k8s安装webrtc-streamer,yaml如何写?相关的知识,希望对你有一定的参考价值。

2022-05-13:k8s安装webrtc-streamer,yaml如何写?

答案2022-05-13:

yaml如下:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: webrtc-streamer
  name: webrtc-streamer
  namespace: moonfdd
spec:
  replicas: 1
  selector:
    matchLabels:
      app: webrtc-streamer
  template:
    metadata:
      labels:
        app: webrtc-streamer
    spec:
      containers:
        - image: mpromonet/webrtc-streamer
          imagePullPolicy: IfNotPresent
          name: webrtc-streamer
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: webrtc-streamer
  name: webrtc-streamer
  namespace: moonfdd
spec:
  ports:
  - port: 8000
    targetPort: 8000
    protocol: TCP
    name: a1
  selector:
    app: webrtc-streamer
  type: NodePort

ffmpeg推流:

ffmpeg.exe -re -i 俄罗斯.mp4 -c copy -f flv -y rtmp://192.168.204.13:63245/live/test1

html和js代码,需要下载

执行结果如下:



以上是关于2022-05-13:k8s安装webrtc-streamer,yaml如何写?的主要内容,如果未能解决你的问题,请参考以下文章

HTTP专项练习,每日一解析2022/05/13

mac安装k8s

k8s系列 - 1.安装、换源、重置

k8s安装问题摘要

k8s1.4.3安装实践记录-k8s安装

3.Docker Desktop安装k8s