apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: foo-deployment
  labels:
    app.kubernetes.io/name: foo
    app.kubernetes.io/version: 0.0.1
    app.kubernetes.io/component-name: nginx
    app.kubernetes.io/component-version: 1.7.9
    app.kubernetes.io/tier: front-end
    app.kubernetes.io/deploy-manager: kubectl
  annotations:
    app.kubernetes.io/usage: http://foo-deployment/
    app.kubernetes.io/url: https://www.nginx.com/
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: foo
  template:
    metadata:
      labels:
        app.kubernetes.io/name: foo
        app.kubernetes.io/version: 0.0.1
        app.kubernetes.io/component-name: nginx
        app.kubernetes.io/component-version: 1.7.9
        app.kubernetes.io/tier: front-end
        app.kubernetes.io/deploy-manager: kubectl
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80