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

Posted 福大大架构师每日一题

tags:

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

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

答案2022-04-03:

yaml如下:

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:k8s安装srs,yaml如何写?的主要内容,如果未能解决你的问题,请参考以下文章

2022-02-27:k8s安装yapi,yaml如何写?

K8S安装grafana grafana.yaml

k8s安装之eventrouter.yaml

2022-02-12:k8s安装es,yaml如何写?

2022-08-14:k8s安装PostgreSQL,yaml如何写?

2022-02-26:k8s安装swagger,yaml如何写?