apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: spring-kubernetes-example
  labels:
    app: spring-kubernetes-example
    tier: backend
spec:
  replicas: 2
  selector:
    matchLabels:
      tier: backend
    matchExpressions:
      - {key: tier, operator: In, values: [backend]}
  template:
    metadata:
      labels:
        app: spring-kubernetes-example
        tier: backend
    spec:
      serviceAccountName: default
      containers:
      - name: spring-kubernetes-example
        image: docker.io/boomzero/spring-conf:1.0.3
        ports:
        - containerPort: 8080
        env:
          - name: username
            valueFrom:
              secretKeyRef:
                name: spring-kubernetes-example
                key: username
          - name: password
            valueFrom:
              secretKeyRef:
                name: spring-kubernetes-example
                key: password
