apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: backend
  labels:
    app: backend
spec:
  selector:
    matchLabels:
      app: backend
      role: master
      tier: backend
  replicas: 1
  template:
    metadata:
      labels:
        app: backend
        role: master
        tier: backend
    spec:
      containers:
        - name: master
          image: pkotas/kubernetes-demo-backend:latest  # or just image: redis
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
          env:
            - name: BACKING_STORE_PASSWORD
              value: "password"
            - name: BACKING_STORE_HOST
              value: "redis-master.default"
            - name: BACKING_STORE_PORT
              value: "6379"
            - name: BACKING_STORE_DB
              value: "0"
            - name: TRACING_CLIENT_HOST
              value: "jaeger-master.default"
            - name: TRACING_CLIENT_PORT
              value: "6831"
          args:
            - "listenHost"
            - "0.0.0.0"
