kind: Service apiVersion: v1 metadata: name: ant-media-server spec: selector: app: ant-media ports: - name: http protocol: TCP port: 5080 --- apiVersion: apps/v1 kind: Deployment metadata: name: ant-media-server spec: selector: matchLabels: app: ant-media replicas: 1 template: metadata: labels: app: ant-media spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - ant-media topologyKey: "kubernetes.io/hostname" hostNetwork: true dnsPolicy: ClusterFirstWithHostNet containers: - name: ant-media-server imagePullPolicy: IfNotPresent # change this value accordingly. It can be Never, Always or IfNotPresent image: ant-media-server-enterprise-k8s:test #change this value according to your image. # By default, mongodb deployment is used. If you're using mongodb somewhere else, specify it with server url(-h) below. # You may also need to add -u and -p parameters for # specifying mongodb username and passwords respectively args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] resources: requests: cpu: 1000m # imagePullSecrets: # - name: docker