apiVersion: apps/v1
kind: Deployment
metadata:
  name: front-door-lock
spec:
  replicas: 1
  selector:
    matchLabels:
      app: front-door-lock
  template:
    metadata:
      labels:
        app: front-door-lock
      annotations:
        prometheus.io/scrape: "false"
    spec:
      containers:
        - name: front-door-lock
          image: bang5:5000/front_door_lock_image
          imagePullPolicy: "Always"
          ports:
          - containerPort: 10011
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: "kubernetes.io/hostname"
                operator: In
                values: ["bang"]
---
apiVersion: v1
kind: Service
metadata:
  name: front-door-lock
spec:
  ports:
  - {port: 10011, targetPort: 10011}
  selector:
    app: front-door-lock
