---
apiVersion: v1
kind: Service
metadata:
  name: hello-app-subdomain
spec:
  selector:
    name: hello-app
  clusterIP: None
  ports:
  - name: http
    port: 80
    targetPort: 8080
---
apiVersion: v1
kind: Pod
metadata:
  name: hello-app-v1
  labels:
    name: hello-app
spec:
  hostname: hello-app-v1
  subdomain: hello-app-subdomain
  setHostnameAsFQDN: true
  containers:
  - image: gcriogooglesamples/hello-app:1.0
    name: hello-app
    ports:
    - name: http
      containerPort: 8080
---
apiVersion: v1
kind: Pod
metadata:
  name: hello-app-v2
  labels:
    name: hello-app
spec:
  hostname: hello-app-v2
  subdomain: hello-app-subdomain
  setHostnameAsFQDN: true
  containers:
  - image: gcriogooglesamples/hello-app:2.0
    name: hello-app
    ports:
    - name: http
      containerPort: 8080
