Unable to Access Mediamtx webrtc stream inside k8s cluster – Minikube

Mediamtx webrtc stream is not accessible while running inside k8s cluster in minikube

I running a mediatmx server on minikube kubernetes cluster. I am passing a rtsp stream as input to the mediamtx server through mediamtx config file as path entry.

Now I am trying to access the corresponding Webrtc stream locally from my browser, by using kubectl port forward to forward mediamtx service to localhost. But I am not able to access the webrtc stream from the browser

Steps to recreate the Issue

  1. Create minikube cluster.
  2. Deploy mediamtx Deployment, Service and Config Map
    The Config map include custom mediamtx.yml config

Mediamtx Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: mediamtx
labels:
app: mediamtx
spec:
replicas: 1
selector:
matchLabels:
app: mediamtx
template:
metadata:
labels:
app: mediamtx
spec:
containers:

  • name: mediamtx
    image: bluenviron/mediamtx
    args: [“/mediamtx.yml”] # Explicitly specify the config file location
    volumeMounts:

  • name: config
    mountPath: /mediamtx.yml
    subPath: mediamtx.yml
    ports:

  • containerPort: 8554

  • containerPort: 1935

  • containerPort: 8888

  • containerPort: 8889

  • containerPort: 8890

  • containerPort: 8189
    env:

  • name: MTX_PROTOCOLS
    value: “tcp”

  • name: MTX_WEBRTCADDITIONALHOSTS
    value: “172.19.0.1”

    volumes:

    • name: config
      configMap:
      name: mediamtx-config
      defaultMode: 0644 # Ensure the file is readable
      Mediamtx Service
      apiVersion: v1
      kind: Service
      metadata:
      name: mediamtx
      spec:
      type: ClusterIP
      ports:

name: rtsp
port: 8554
targetPort: 8554
protocol: TCP
name: rtmp
port: 1935
targetPort: 1935
protocol: TCP
name: web
port: 8888
targetPort: 8888
protocol: TCP
name: web-rtc
port: 8889
targetPort: 8889
protocol: TCP
name: rtsp-udp
port: 8890
targetPort: 8890
protocol: UDP
name: udp-extra
port: 8189
targetPort: 8189
protocol: UDP
selector:
app: mediamtx
mediamtx config map
apiVersion: v1
kind: ConfigMap
metadata:
name: mediamtx-config
data:
mediamtx.yml: |

Your custom MediaMTX configuration goes here

webrtcICEServers2:

– url: stun:stun2.1.google.com:19302

paths:

example:

mycamera:
source: rtsp://admin:[email protected]:554/unicaststream/1

all_others:

  1. The Config map includes custom mediamtx configuration. I have added a default rtsp stream path entry to it, And trying to access the corresponding webrtc streams.

  2. Apply all resources, wait for medamtx pod to start. Expose mediamtx service using kubectl port-forward

Now the webrtc stream should be accessible at http://localhost:8889/mycamera, But I am not able to access it

New contributor

Sharan phadke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Unable to Access Mediamtx webrtc stream inside k8s cluster – Minikube

Mediamtx webrtc stream is not accessible while running inside k8s cluster in minikube

I running a mediatmx server on minikube kubernetes cluster. I am passing a rtsp stream as input to the mediamtx server through mediamtx config file as path entry.

Now I am trying to access the corresponding Webrtc stream locally from my browser, by using kubectl port forward to forward mediamtx service to localhost. But I am not able to access the webrtc stream from the browser

Steps to recreate the Issue

  1. Create minikube cluster.
  2. Deploy mediamtx Deployment, Service and Config Map
    The Config map include custom mediamtx.yml config

Mediamtx Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: mediamtx
labels:
app: mediamtx
spec:
replicas: 1
selector:
matchLabels:
app: mediamtx
template:
metadata:
labels:
app: mediamtx
spec:
containers:

  • name: mediamtx
    image: bluenviron/mediamtx
    args: [“/mediamtx.yml”] # Explicitly specify the config file location
    volumeMounts:

  • name: config
    mountPath: /mediamtx.yml
    subPath: mediamtx.yml
    ports:

  • containerPort: 8554

  • containerPort: 1935

  • containerPort: 8888

  • containerPort: 8889

  • containerPort: 8890

  • containerPort: 8189
    env:

  • name: MTX_PROTOCOLS
    value: “tcp”

  • name: MTX_WEBRTCADDITIONALHOSTS
    value: “172.19.0.1”

    volumes:

    • name: config
      configMap:
      name: mediamtx-config
      defaultMode: 0644 # Ensure the file is readable
      Mediamtx Service
      apiVersion: v1
      kind: Service
      metadata:
      name: mediamtx
      spec:
      type: ClusterIP
      ports:

name: rtsp
port: 8554
targetPort: 8554
protocol: TCP
name: rtmp
port: 1935
targetPort: 1935
protocol: TCP
name: web
port: 8888
targetPort: 8888
protocol: TCP
name: web-rtc
port: 8889
targetPort: 8889
protocol: TCP
name: rtsp-udp
port: 8890
targetPort: 8890
protocol: UDP
name: udp-extra
port: 8189
targetPort: 8189
protocol: UDP
selector:
app: mediamtx
mediamtx config map
apiVersion: v1
kind: ConfigMap
metadata:
name: mediamtx-config
data:
mediamtx.yml: |

Your custom MediaMTX configuration goes here

webrtcICEServers2:

– url: stun:stun2.1.google.com:19302

paths:

example:

mycamera:
source: rtsp://admin:[email protected]:554/unicaststream/1

all_others:

  1. The Config map includes custom mediamtx configuration. I have added a default rtsp stream path entry to it, And trying to access the corresponding webrtc streams.

  2. Apply all resources, wait for medamtx pod to start. Expose mediamtx service using kubectl port-forward

Now the webrtc stream should be accessible at http://localhost:8889/mycamera, But I am not able to access it

New contributor

Sharan phadke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật