apiVersion: apps/v1
kind: Deployment
metadata:
  name: rdf-to-mqtt
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rdf-to-mqtt
  template:
    metadata:
      labels:
        app: rdf-to-mqtt
    spec:
      containers:
        - name: rdf-to-mqtt
          image: bang5:5000/rdf_to_mqtt_image
          imagePullPolicy: "Always"
          ports:
          - containerPort: 10008
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: "kubernetes.io/hostname"
                operator: In
                values: ["bang"]
---
apiVersion: v1
kind: Service
metadata:
  name: rdf-to-mqtt
spec:
  ports:
  - {port: 10008, targetPort: 10008}
  selector:
    app: rdf-to-mqtt
