josephnhtam / live-streaming-server-net

A .NET implementation of RTMP live streaming server, supporting HTTP-FLV, WebSocket-FLV, HLS, Kubernetes, cloud storage services integration and more.
https://josephnhtam.github.io/live-streaming-server-net/
MIT License
74 stars 11 forks source link

Running On Docker #21

Closed kasirajansfm closed 2 months ago

kasirajansfm commented 2 months ago

Hi @josephnhtam when i try to run on docker with this "LiveStreamingServerNet.KubernetesPodDemo", added "EXPOSE 1935", then its started, when i try to stream, am getting below error. Also commented out Redis.

image

josephnhtam commented 2 months ago

@kasirajansfm

First of all, LiveStreamingServerNet.KubernetesPodDemo isn't supposed to be simply run in Docker. As the name implies, it should run in Kubernetes environment.

The Kubernetes operator and integration are not yet released, so the guide is not yet available. But the codes have been available, so you can try them if you have Docker Desktop with Kubernetes enabled.

  1. Build the image of LiveStreamingServerNet.KubernetesOperator Navigate to src/LiveStreamingServerNet.KubernetesOperator, and run

    make build
  2. Deploy the Controller, CRD to Kubernetes Navigate to src/LiveStreamingServerNet.KubernetesOperator, and run

    make deploy_docker_desktop
  3. Build the image of LiveStreamingServerNet.KubernetesPodDemo Navigate to samples/LiveStreamingServerNet.KubernetesPodDemo, and run

    make build
  4. Deploy the Kubernetes resources (Fleet, Redis, ServiceAccount, LoadBalancer, ...) Navigate to samples/LiveStreamingServerNet.KubernetesPodDemo, and run

    make deploy_docker_desktop

After that, you should be able to publish streams to localhost:1935. As more streams are published, more pods will be created automatically, and vice versa.

Note that: you need to have Make installed