apiVersion: apps/v1
kind: Deployment
metadata:
  name: secretreader
  labels:
    name: secretreader
spec:
  replicas: 1
  selector:
    matchLabels: 
      name: secretreader
  template:
    metadata:
      labels:
        name: secretreader
    spec:
      containers:
      - name: secretreader
        image: karthequian/secretreader:latest
        env:
        - name: api_key
          valueFrom:
            secretKeyRef:
              name: apikey
              key: api_key