前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >2022-04-03:k8s安装srs,yaml如何写?

2022-04-03:k8s安装srs,yaml如何写?

作者头像
福大大架构师每日一题
发布2022-04-13 09:32:03
1750
发布2022-04-13 09:32:03
举报
文章被收录于专栏:福大大架构师每日一题

2022-04-03:k8s安装srs,yaml如何写?

答案2022-04-03:

yaml如下:

代码语言:javascript
复制
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: srs
  name: srs
  namespace: moonfdd
spec:
  replicas: 1
  selector:
    matchLabels:
      app: srs
  template:
    metadata:
      labels:
        app: srs
    spec:
      containers:
        - image: ossrs/srs
          imagePullPolicy: IfNotPresent
          name: srs
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: srs
  name: srs
  namespace: moonfdd
spec:
  ports:
    - name: rtmp
      port: 1935
      protocol: TCP
      targetPort: 1935
      nodePort: 11935
    - name: console
      port: 1985
      protocol: TCP
      targetPort: 1985
      nodePort: 11985
    - name: stream
      port: 8080
      protocol: TCP
      targetPort: 8080
      nodePort: 18080
  selector:
    app: srs
  type: NodePort

结果如下:

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2022-04-03,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 福大大架构师每日一题 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档