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

Posted 福大大架构师每日一题

tags:

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

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

答案2022-05-09:

yaml如下:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: lal
  name: lal
  namespace: moonfdd
spec:
  replicas: 1
  selector:
    matchLabels:
      app: lal
  template:
    metadata:
      labels:
        app: lal
    spec:
      containers:
        - args: ["/lal/bin/lalserver","-c","/lal/conf/lalserver.conf.json"]
          image: q191201771/lal
          imagePullPolicy: IfNotPresent
          name: lal
          volumeMounts:
            - mountPath: /lal/conf
              name: volv
      volumes:
        - hostPath:
            path: /root/k8s/moonfdd/lal/lal/conf
            type: DirectoryOrCreate
          name: volv
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: lal
  name: lal
  namespace: moonfdd
spec:
  ports:
  - port: 1935
    targetPort: 1935
    protocol: TCP
    name: a1
  - port: 8080
    targetPort: 8080
    protocol: TCP
    name: a2
  - port: 4433
    targetPort: 4433
    protocol: TCP
    name: a3
  - port: 5544
    targetPort: 5544
    protocol: TCP
    name: a4
  - port: 8083
    targetPort: 8083
    protocol: TCP
    name: a5
  - port: 8084
    targetPort: 8084
    protocol: TCP
    name: a6
  selector:
    app: lal
  type: NodePort

给流媒体服务器推流:

ffmpeg.exe -re -i 1.MP4 -vcodec copy -acodec copy -rtsp_transport tcp -f rtsp rtsp://192.168.204.13:51534/live/test1

结果如下:

以上是关于2022-05-09:k8s安装lalserver流媒体服务器,yaml如何写?的主要内容,如果未能解决你的问题,请参考以下文章

《安富莱嵌入式周报》第265期:2022.05.09--2022.05.15

《安富莱嵌入式周报》第265期:2022.05.09--2022.05.15

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

mac安装k8s

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

k8s安装问题摘要