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

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

原创
作者头像
福大大架构师每日一题
发布于 2022-04-03 14:31:50
发布于 2022-04-03 14:31:50
1910
举报

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

答案2022-04-03:

yaml如下:

代码语言:yaml
AI代码解释
复制
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

结果如下:

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

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

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

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

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