apiVersion: apps/v1
kind: Deployment
metadata:
  name: site-v1
spec:
  replicas: 2
  selector:
    matchLabels:
      app: site
      version: v1
  template:
    metadata:
      labels:
        app: site
        version: v1
    spec:
      containers:
      - name: whereami
        image: us-docker.pkg.dev/google-samples/containers/gke/whereami:v1.2.20
        ports:
          - containerPort: 8080
        env:
        - name: METADATA
          value: "site-v1"
---
apiVersion: v1
kind: Service
metadata:
  name: site-v1
spec:
  selector:
    app: site
    version: v1
  ports:
  - port: 8080
    targetPort: 8080