apiVersion: v1
kind: ReplicationController
metadata:
  name: hotel-api-controller
  labels:
    name: hotel-api-controller
spec:
  replicas: 2
  selector:
    app: hotel-api
    version: v1
  template:
    metadata:
      name: hotel-api-pod
      labels:
        app: hotel-api
        version: v1
    spec:
      containers:
      - name: hotel-api
        image: hotel-api
        env:
        - name: BINDING
          value: ":8080"
        - name: ENVIRONMENT
          value: "production"
        ports:
        - containerPort: 8080
        livenessProbe:
          httpGet:
            path: /
            port: 8080
          initialDelaySeconds: 30
          timeoutSeconds: 1