apiVersion: apps/v1 kind: Deployment metadata: name: go2rtc labels: app.kubernetes.io/name: go2rtc app.kubernetes.io/instance: go2rtc spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app.kubernetes.io/name: go2rtc app.kubernetes.io/instance: go2rtc template: metadata: labels: app.kubernetes.io/name: go2rtc app.kubernetes.io/instance: go2rtc spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - go2rtc topologyKey: "kubernetes.io/hostname" nodeSelector: dedicated: nvr tolerations: - key: dedicated operator: Equal value: nvr effect: NoSchedule containers: - name: go2rtc image: alexxit/go2rtc ports: - name: rtsp containerPort: 8554 protocol: TCP - name: api containerPort: 1984 protocol: TCP volumeMounts: - mountPath: /config/go2rtc.yaml subPath: config.yml name: config resources: limits: nvidia.com/gpu: 1 volumes: - name: config secret: secretName: go2rtc-config items: - key: config.yml path: config.yml --- apiVersion: v1 kind: Service metadata: name: go2rtc labels: app.kubernetes.io/name: go2rtc app.kubernetes.io/instance: go2rtc spec: type: ClusterIP ipFamilyPolicy: SingleStack ports: - name: rtsp port: 8554 protocol: TCP targetPort: rtsp selector: app.kubernetes.io/name: go2rtc app.kubernetes.io/instance: go2rtc