apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: apache-example-deployment
spec:
  selector:
    matchLabels:
      app: apache-example
  template:
    metadata:
      labels:
        app: apache-example
    spec:
      containers:
      - name: apache
        image: httpd:2.4
        ports:
        - containerPort: 80