apiVersion: apps/v1
kind: Deployment
metadata:
  name: webserver-blue
spec:
  replicas: 3
  selector:
    matchLabels:
      type: webserver
      color: blue
  template:
    metadata:
      labels:
        type: webserver
        color: blue
    spec:
      containers:
      - image: gcr.io/docker-book-313801/imageview:blue
        name: webserver-container
        env:
        - name: PROJECT_ID
          valueFrom:
            configMapKeyRef:
              name: projectid
              key: project.id
        - name: SECRET_ID
          valueFrom:
            secretKeyRef:
              name: apikey
              key: id
        - name: SECRET_KEY
          valueFrom:
            secretKeyRef:
              name: apikey
              key: key
        ports:
        - containerPort: 80
          name: http-server

