apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment-from-def
  namespace: default
spec:
  selector:
    matchLabels:
      app: nginx-from-def
  replicas: 1
  template:
    metadata:
      labels:
        app: nginx-from-def
        other: label
    spec:
      containers:
        - name: nginx
          image: nginx:1.14.2
          ports:
            - containerPort: 80